Forum Replies Created

Viewing 15 posts - 2,656 through 2,670 (of 3,348 total)

  • RE: HAVING without GROUP BY

    Chris Cradock (9/1/2010)


    Given that 'having' should be executed after the aggregate has been formed, and code2 isn't in the column list, I don't see why the line is even valid

    Why...

  • RE: HAVING without GROUP BY

    webrunner (8/31/2010)


    I guess I was focused too much on the COUNT() function itself and what it returns instead of the SELECT query as a whole and the fact that the...

  • RE: HAVING without GROUP BY

    webrunner (8/31/2010)


    Thanks for the great question. The answer still seems counterintuitive to me - I expected that selecting COUNT(*) would return at least one row (the count result, whether 0...

  • RE: HAVING without GROUP BY

    brazumich (8/31/2010)


    I don't mind being wrong (heck, if I were right all the time...) but it does mystify me a bit that the HAVING clause empties the result set. I...

  • RE: HAVING without GROUP BY

    Toby Harman (8/30/2010)


    Nice. Helps if I remember that 6 > 5 :blush:

    :laugh: I feel your pain. I managed to miss the point as well - on my own question! :w00t:

    Thanks...

  • RE: SET ROWCOUNT and table variable

    Carlo Romagnano (8/30/2010)


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

  • RE: ALTER

    taylor_benjamin (8/27/2010)


    Sadly, receiving the response through comments I cannot see the original question. From my unreliable memory I remember parts of the question as follows: 🙂

    It's very easy to check...

  • RE: Table Variables

    cwcridindirty (8/27/2010)


    Table variables can be truncated.

    Are you sure?

    DECLARE @Vendors TABLE

    (VendorPK int,

    VendorName varchar(50),

    VendorStatus char(1));

    TRUNCATE TABLE @Vendors;

    Msg 102, Level 15, State...

  • RE: Gaps in SQL Server Identity Columns

    Casper101 (8/26/2010)


    There is a clustered index on this column and I have added an ORDER BY to confirm that IDs are skipped.

    There are many constraints on this table as well.

    What...

  • RE: How many rows?

    dogramone (8/26/2010)


    This really highlights why I don't like SQL Server's implicit data type conversion.

    Good point. Always ensure your types match, or use explicit conversion when they don't.

    (Though the empty string...

  • RE: The Semantics of NULL in SQL Server 2008

    frodriguez.im (8/26/2010)


    what is an empty value? AFAIK, NULL is the only way to leave a field empty!

    For string columns and variables, the empty string is an often-used synonym for the...

  • RE: Is this trigger okay?

    sku370870 (8/24/2010)


    Is the trigger below correctly written? The reason I ask is that when I look in the Audit tables I often see what look like duplicated entries.

    It is not...

  • RE: SET ROWCOUNT and table variable

    Last comment, and then I'll shut up (for now)

    Open Minded (8/26/2010)


    isn't it possible to use approximation if one is not specific of the exact value of the approximation, like "less...

  • RE: SET ROWCOUNT and table variable

    stewartc-708166 (8/25/2010)


    The only possible use for the float datatype that I have found is in the calculations used in astro-physics, where the distance between stars and galaxies is an approximation,...

  • RE: SET ROWCOUNT and table variable

    da-zero (8/26/2010)


    I do not really understand how the scope of the type variable works. It seems you can define it over and over again, without an error being thrown?

    and

    martin.whitton (8/26/2010)


    It's...

Viewing 15 posts - 2,656 through 2,670 (of 3,348 total)