T-SQL Syntax Gotchas

  • Thank you, a nice puzzle to work out first thing in the morning. Close, though, I had forgotten that 'COMPUTE' had been deprecated and had to think about that one.

    Thanks,

    Sean

  • Toreador (7/8/2014)


    Gazareth (7/8/2014)


    Toreador (7/8/2014)


    Being pedantic, only 3 of those statements return syntax errors...

    Are you running it on SQL 2008 R2 or earlier?

    Statement 6 is valid there but not on 2012 onwards.

    SQL2014.

    Statement 3 fails with "An object or column name is missing or empty...."

    The others fail with a syntax error.

    I did say I was being pedantic 😉

    Gotcha. I didn't parse your statement correctly 🙂

  • I am running at sql server 2008 R2... for section 6 i didn't get any error....

    Manik
    You cannot get to the top by sitting on your bottom.

  • manik123 (7/15/2014)


    I am running at sql server 2008 R2... for section 6 i didn't get any error....

    The question states that the script was run against a 2012 instance. Section 6 will fail on 2012 and above.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • nice question.

    thanks Sean.

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply