T-SQL Oddities

  • Tom.Thomson (4/6/2010)


    Peter Brinkhaus (3/23/2010)


    Note that variable names @, @@ or names starting with @@ are deprecated in SQL 2008. See http://msdn.microsoft.com/en-us/library/ms143729.aspx:

    Do not use @ or @@ or names that begin with @@ as identifiers.

    Peter

    And # and ## as temp table and stored proc names are going too, either someone at MS has no sense of humour or they are making an attempt to prevent people writing ridiculously incomprehensible code, which would be bound to fail because all good programmers can write incomprehensible code in any useful language, and bad programmers can't write any other sort.

    Have a link to that? The top one makes sense... that one does not.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • Garadin (4/6/2010)


    Tom.Thomson (4/6/2010)


    Peter Brinkhaus (3/23/2010)


    Note that variable names @, @@ or names starting with @@ are deprecated in SQL 2008. See http://msdn.microsoft.com/en-us/library/ms143729.aspx:

    Do not use @ or @@ or names that begin with @@ as identifiers.

    Peter

    And # and ## as temp table and stored proc names are going too, either someone at MS has no sense of humour or they are making an attempt to prevent people writing ridiculously incomprehensible code, which would be bound to fail because all good programmers can write incomprehensible code in any useful language, and bad programmers can't write any other sort.

    Have a link to that? The top one makes sense... that one does not.

    The same link http://msdn.microsoft.com/en-us/library/ms143729.aspx works for that too - look for "'#' and '##' as the name of temporary tables and stored procedures" in the feature name column of the tables.

    Tom

  • Tom.Thomson (4/6/2010)


    Garadin (4/6/2010)


    Tom.Thomson (4/6/2010)


    Peter Brinkhaus (3/23/2010)


    Note that variable names @, @@ or names starting with @@ are deprecated in SQL 2008. See http://msdn.microsoft.com/en-us/library/ms143729.aspx:

    Do not use @ or @@ or names that begin with @@ as identifiers.

    Peter

    And # and ## as temp table and stored proc names are going too, either someone at MS has no sense of humour or they are making an attempt to prevent people writing ridiculously incomprehensible code, which would be bound to fail because all good programmers can write incomprehensible code in any useful language, and bad programmers can't write any other sort.

    Have a link to that? The top one makes sense... that one does not.

    The same link http://msdn.microsoft.com/en-us/library/ms143729.aspx works for that too - look for "'#' and '##' as the name of temporary tables and stored procedures" in the feature name column of the tables.

    Oops, guess I should have clicked that first. I misread your original post. Temp Tables/SP's named *specifically* # or ## are going away, but #a or ##a is still fine. I thought you were saying you weren't going to be allowed to use # or ## to begin the names anymore; which sounded crazy. My fault!

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • all good programmers can write incomprehensible code in any useful language, and bad programmers can't write any other sort.

    That makes the day start off well 😀

    -------------------------------------------------------------------------
    Normal chaos will be resumed as soon as possible. :crazy:

Viewing 4 posts - 31 through 33 (of 33 total)

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