T-SQL Oddities

  • Just to be cruel... go into query options (on someone else's machine) and change the batch separator from "GO" to "SELECT".

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • You definitely have to check out this[/url] and this.

    Very funny.

    -- Gianluca Sartori

  • The Dixie Flatline (3/24/2010)


    Just to be cruel... go into query options (on someone else's machine) and change the batch separator from "GO" to "SELECT".

    Awesome! Cannot wait to try that...:-D

  • The Dixie Flatline (3/24/2010)


    Just to be cruel... go into query options (on someone else's machine) and change the batch separator from "GO" to "SELECT".

    And what opportune timing, with April Fool's day right around the corner. Now I just need to figure out how to get onto my co-worker's computer without him knowing...

    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]

  • Gianluca Sartori (3/24/2010)


    You definitely have to check out this[/url] and this.

    Very funny.

    I knew I had seen this, but I thought it was on this site. Thanks for the links.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • The Dixie Flatline (3/24/2010)


    Just to be cruel... go into query options (on someone else's machine) and change the batch separator from "GO" to "SELECT".

    That is totally rotten.

    I like it.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Gianluca Sartori (3/24/2010)


    You definitely have to check out this[/url] and this.

    Very funny.

    Ah yes, it is all coming back to me now. I remember a blog about tibbling and then reading that same article by Phil. I think it would be quite funny to name the tables something like those characters.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • At least in 2k8 we have Intellisense otherwise it might be a tad difficult remembering which symbolic (or should that be shambolic) table is which 😉

    Now was it ~¬.¬~ or ¬~.~¬

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

  • John McC (3/25/2010)


    At least in 2k8 we have Intellisense otherwise it might be a tad difficult remembering which symbolic (or should that be shambolic) table is which 😉

    Now was it ~¬.¬~ or ¬~.~¬

    neither. It was ¿¿?¿¿

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Ah.

    That would explain why I couldn't find the b@##y st??%d table

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

  • John McC (3/26/2010)


    Ah.

    That would explain why I couldn't find the b@##y st??%d table

    I think so.

    Another reason could be that the table changes names daily. Guess what it is today.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I'm almost inspired to create a whole database with "picture text" table names like >^.^< and <('.'<).

    ...

    Almost.

    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 (3/26/2010)


    I'm almost inspired to create a whole database with "picture text" table names like >^.^< and <('.'<).

    ...

    Almost.

    That would be a fun database and could be quite a fun blog or presentation.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • As a bit of a side bar, my favorite name for a Temp table used to resolve a difficult problem is... you guessed it... #MyHead. 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

    Tom

Viewing 15 posts - 16 through 30 (of 33 total)

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