Forum Replies Created

Viewing 15 posts - 706 through 720 (of 1,187 total)

  • RE: What will happen?

    DECLARE @a INT

    DECLARE @b DATETIME

    SET @a = @b

    The above code executed successfully for me in SQL 2005 but gave the error listed in the answer when I ran it in...

  • RE: SQL DBA Career Path Advice Please

    My two cents (worth about a penny and a half at most 🙂 ):

    Make sure you learn as much as you can about each possible job regarding how specialized it...

  • RE: HAVING without GROUP BY

    Hugo Kornelis (8/31/2010)


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

  • RE: HAVING without GROUP BY

    Hugo Kornelis (8/31/2010)


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

  • RE: HAVING without GROUP BY

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

  • RE: SET ROWCOUNT and table variable

    mccork (8/25/2010)


    The answer was almost obvious from the "do not run it on production server" recommendation.

    But, a good question for highlighting the pitfalls of "float".

    That is what led me to...

  • RE: Round up or down IV

    hrvoje.piasevoli (8/23/2010)


    Hi great qod!

    Here's a tip:

    Move the decimal point to the left by the negative number and then do a regular ROUND(d, 0). Applied to this it ends looking...

  • RE: When To Touch

    Thanks for highlighting this dilemma, Steve.

    Others have (and I'm sure will) add more and better detail on other aspects of this question. But I just wanted to point out one...

  • RE: TempDB

    mtassin (8/18/2010)


    webrunner (8/18/2010)


    What I am wondering is, if hypothetically this restriction were lifted and one could set the recovery model of tempdb to Full, what would be the impact of...

  • RE: TempDB

    mtassin (8/18/2010)


    webrunner (8/18/2010)


    I'm grateful for the point. It was easy for me - which I can't say about too many questions, but I'm especially glad I didn't second-guess myself into...

  • RE: TempDB

    I'm grateful for the point. It was easy for me - which I can't say about too many questions, but I'm especially glad I didn't second-guess myself into a wrong...

  • RE: Round up or down III

    I went 0 for 3 on the rounding questions. Scary. Well, what was really scary was that I didn't read through the ROUND documentation after the first question, which no...

  • RE: Distinct clause in Select statement

    Luke L (7/26/2010)


    webrunner (7/26/2010)


    Good question, interesting to learn that the parentheses make no difference for SELECT DISTINCT.

    I have one question, though. I've seen people show me queries where they...

  • RE: Distinct clause in Select statement

    bitbucket-25253 (7/26/2010)


    webrunner

    Easy enough to find out ...

    CREATE TABLE #T(userid INT)

    INSERT INTO #T

    SELECT 1 UNION ALL

    SELECT 1 UNION ALL

    SELECT 2 UNION ALL

    SELECT 3 UNION ALL

    SELECT 4 UNION ALL

    SELECT 5...

  • RE: Distinct clause in Select statement

    Good question, interesting to learn that the parentheses make no difference for SELECT DISTINCT.

    I have one question, though. I've seen people show me queries where they write SELECT COUNT(DISTINCT...

Viewing 15 posts - 706 through 720 (of 1,187 total)