Forum Replies Created

Viewing 15 posts - 1,006 through 1,020 (of 1,315 total)

  • RE: incremental in second column

    I read from the holy BOL:

    computed_column_expression

    Is an expression defining the value of a computed column. A computed column is a virtual column not physically stored in the table....

  • RE: Maximum date in query

    select

    CASE WHEN @d1 > ISNULL(@d2

  • RE: incremental in second column

    Your post said to create a clustered index on IdentValue and nothing about a ModelID index, but I assume this was an oversight.  Obviously it works much better with a...

  • RE: Hello Friends , i have a thought about the query , but i need your confirmation please.

    An exact value sometimes allows the query optimizer to come up with a better plan.  It knows exactly which rows match, or possibly that there are no matching rows.

    With a...

  • RE: Proper way to join tables

    Not so fast.  If your question is specifically about the order of tables in the ON clause, everyone who expressed a preference said they agreed with your style.  So do I. ...

  • RE: Table aliases

    I reckon the time it takes the engine to parse a long alias vs a short alias is microscopic.  The time it takes you to figure out what a large...

  • RE: incremental in second column

    The function Sergiy posted would certainly work, but I would worry about performance issues as the invoice table grows.  With a clustered index on the identity field, it would have...

  • RE: Row level locking to prevent simultaneous update

    In addition to the locked bit field and lockeddate datetime field, wouldn't you also need a session id field so you know which web user locked the row?

    I might try...

  • RE: SQL Question - Unions

    This may work, if I understand your question.  I think you're looking for a list of views and %tax%sale% (or %sale%tax%) columns that also contain a %sales% column.

  • RE: Are there any database tools to Check Structure??

    For performance issues, Query Analyzer's Index Analysis Wizard can evaluate existing indexes and suggest new ones.  Put examples of common queries used in this database together in one script, then...

  • RE: Setting all DB''''s to Simple Recovery Model

    A cursor-less way to generate all your ALTER DATABASE statements would be:

    select

    'ALTER DATABASE ' +...

  • RE: SP4 vs SP3 ??

    I read somewhere that if you upgrade your servers to SP4 you have to upgrade the client tools for anyone using EM and QA.  I quickly lost interest in it after that,...

  • RE: 8k or bust

    Starting with the script Casey posted, change the line

        SET @SubQueryText='CASE ... END AS [<COLUMN_NAME>]'

    to

        SET @SubQueryText='MAX(CASE ... END) AS [<COLUMN_NAME>]'

    then modify the final EXEC to

        EXEC(... + @WhereSQL +...

  • RE: Interactively input in stored procedure

    The answer is absolutely not an interactive stored procedure.  You could use a DTS or SSIS package with an InputBox in a script task, a web page, a .vbs script with ADO, or many other...

  • RE: 8k or bust

    I think you may need further modification to get one row per CustomTableRowID.

    The subqueries should be something like "MAX(CASE ... END) as [<COLUMN_NAME>]", and add GROUP BY a.CustomTableRowID at the...

Viewing 15 posts - 1,006 through 1,020 (of 1,315 total)