Forum Replies Created

Viewing 15 posts - 721 through 735 (of 821 total)

  • RE: Computed Column Divide by Zero?

    Be aware of computed columns that use complex formula or call functions, they may lead to performance problems:

    create function getsum(@id int)

    returns int

    as

    begin

    return (select sum(id) from sysobjects...

  • RE: Computed Column Divide by Zero?

    henrik staun poulsen (10/13/2010)


    In order to get round the divide by zero error, I generally do this:

    PF1 AS QF1 / nullif((QF1 + QF2),0),

    instead of

    PF1 AS QF1 / (QF1 + QF2),

    Good....

  • RE: Variable Array Table

    Obvious! In the daily work you do not need a special syntax. But, sometime my clients ask me for something special. And thanks to the delimiter I can extract...

  • RE: ANSI NULLS

    Using SQL Server 2005, what is the output of the SELECT statement below?

    Same behavior for previous versions of sqlserver.

  • RE: Triggers and Transactions

    Hugo Kornelis (10/1/2010)


    The description of the effects of ROLLBACK in a trigger is word for word the same for the current version and for SQL Server 2000.

    See http://msdn.microsoft.com/en-us/library/ms181299.aspx and http://msdn.microsoft.com/en-us/library/aa238433%28SQL.80%29.aspx.

    I...

  • RE: Triggers and Transactions

    tommyh.

    Running the code under 2000 all i get is

    (1 row(s) affected)

    under 2005 and 2008 i get

    Server: Msg 3609, Level 16, State 1, Line 1

    The transaction ended in the trigger....

  • RE: Creating indexes on computed columns

    Here the script that states "No column reference pulls data from multiple rows"

    create function aaaa() returns int

    as

    begin

    return (select SUM(a) from aza )

    end

    GO

    create table aza(a int,b as...

  • RE: backup database

    Some operations have no sense inside a transaction. I surprise to see so many wrong answers.

  • RE: SET ROWCOUNT and table variable

    nisan.al (8/29/2010)


    I can't say i completely understand this issue.

    The while statement dont not stop because @i will never be equal to 1

    So how come the following select return 1 ?

    DECLARE...

  • RE: SET ROWCOUNT and table variable

    Steve Eckhart (8/26/2010)


    Very good question. I discovered that whether or not 0.9 + 0.1 <> 1 is not consistent I guess depending on sequence. If you execute the following in...

  • RE: SET ROWCOUNT and table variable

    To compare two floating point I use this syntax:

    IF ABS(varFloat1 - varFloat2) < 0.01 -- place here the precision you want

    print 'varFloat1 = varFloat2'

    ELSE

    print...

  • RE: The Semantics of NULL in SQL Server 2008

    da-zero (8/24/2010)


    Carlo Romagnano (8/24/2010)


    One way to avoid worrying about NULLs is never to use them, always declaring columns as not allowing NULLs and designating default values for "empty" or "unknown"....

  • RE: The Semantics of NULL in SQL Server 2008

    ajs-1102829 (8/23/2010)


    Comments posted to this topic are about the item <A HREF="/articles/T-SQL/70808/">The Semantics of NULL in SQL Server 2008</A>

    SQL2008???

    What's the difference from the other versions of sqlserver or ANSI...

  • RE: The Semantics of NULL in SQL Server 2008

    One way to avoid worrying about NULLs is never to use them, always declaring columns as not allowing NULLs and designating default values for "empty" or "unknown". This will save...

  • RE: Distinct clause in Select statement

    Hugo Kornelis (7/26/2010)COUNT(*) returns the number of columns (regardless of values);

    That's false: COUNT(*) returns the number of ROWS regardless of values of columns. :w00t:

Viewing 15 posts - 721 through 735 (of 821 total)