T-SQL Puzzle

  • LalitMadan

    SSC Eights!

    Points: 841

    Comments posted to this topic are about the item T-SQL Puzzle

  • This was removed by the editor as SPAM

  • georgemanaila

    Old Hand

    Points: 348

    You have to consider that this answer works only for case insensitive collation. If you have Case sensitive the second query will return just one row.

    Thanks

  • Toreador

    SSChampion

    Points: 11248

    Presumably one of the last two options was supposed to be Two and Two, otherwise they are both the same and there's only one answer that has Two for the second query (which meant that I could get it right without having a clue what FMTONLY meant)

  • akljfhnlaflkj

    SSC Guru

    Points: 76202

    Didn't know about this one. Thanks.

  • Revenant

    SSC-Forever

    Points: 42467

    Really interesting - thanks!

  • suryam

    Mr or Mrs. 500

    Points: 534

    Nice 1 :w00t:

    Thanks:hehe:

  • TomThomson

    SSC Guru

    Points: 104772

    Nice easy question.
    I wonder why MS is advising not to use FMTONLY.

    Tom

  • Koen Verbeeck

    SSC Guru

    Points: 258955

    Thanks for the question. Now you only have to put the semicolon not on a new line, before I go insane 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Jeff Moden

    SSC Guru

    Points: 995662

    Koen Verbeeck - Tuesday, January 17, 2017 7:05 AM

    Thanks for the question. Now you only have to put the semicolon not on a new line, before I go insane 🙂

    You must really hate reading my code examples. 

    --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.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "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)

Viewing 10 posts - 1 through 10 (of 10 total)

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