Forum Replies Created

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

  • RE: Output of Query

    -- non standard ansi

    SELECT NullableColumn FROM NullOperation WHERE ISNULL(NullableColumn,'') <> '1'

    OR

    -- standard ansi

    SELECT NullableColumn FROM NullOperation WHERE COALESCE(NullableColumn,'') <> '1'

  • RE: SQL Server 2008 R2

    Hugo Kornelis (10/22/2010)


    I got it wrong. I blame my total lack of interest in the R2 release.

    But a quick question - if Multi-Server Administration was a new feature in SQL...

  • RE: Color coding

    Thanks Hugo.

    I work with SSMS sql2500, too.

  • RE: Color coding

    I answered TRUE, but reading and re-reading both question and answer, I do not understand why it's false. Please Hugo, help us to understand.

  • 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...

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