IFF - 1

  • Comments posted to this topic are about the item IFF - 1

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Nice question thanks Ron, and good to know that IIF is going to be available in 2012 .. I used to use the syntax a lot in a previous language.

    ("Shhhh .. be vewwy quiet .. I'm huntin' #div0 errors")

    Some careful reading also got me safely past the 'gotcha' of comparing varchar(4) to varchar(1)

    but from the same careful reading, a small quibble ... command is I'I'F, and the posted question is titled "I'F'F - 1" :w00t:

  • Good question ron.

    You write down in question that "Meaning IIF is not a function in SQL SERVER 2012? ". I think it should be "Meaning IIF is not a user define function in SQL SERVER 2012?". This line confuses.

    Anyway thanks for question.:-)

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!

  • Danny Ocean (6/5/2013)


    Good question ron.

    You write down in question that "Meaning IIF is not a function in SQL SERVER 2012? ". I think it should be "Meaning IIF is not a user define function in SQL SERVER 2012?". This line confuses.

    Anyway thanks for question.:-)

    Actually I was confused, if the question is about IFF or IIF. The question heading says "IFF" but the question is about "IIF" :hehe:

    Verdict: "IFF" is nothing but a typographic error in the Qotd; contrary it is a short-hand notation for "IF and Only IF" used in mathematics (I do remember this from my high school days).

    Anyways, nice question Ron!

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • Collation, collation, collation....

  • palotaiarpad (6/6/2013)


    Collation, collation, collation....

    If not specified, the default collation always is CASE INSENSITIVE.

  • Why does 'r ' = 'R' evaluate to true?

    Steve

  • sfayer (6/6/2013)


    Why does 'r ' = 'R' evaluate to true?

    Steve

    Thats what i was going to say. Surely that depends on if the system is running with Case Sensitive or Case Insensitive?

  • default collation is choosen at installation process - so imo it could be CS_AS.

  • michlimes (6/6/2013)


    default collation is choosen at installation process - so imo it could be CS_AS.

    You can override the installation defaults when doing the installation. Then you don't have a default installation any more, you have a non-default one. So the word "default" is a bit ambiguous - the server default in your instance is not the installation default.

    However, I think you are right to suggest that the collation should always be specified in a QotD when it is relevant.

    Tom

  • This was removed by the editor as SPAM

  • I was wondering about the collation issue (i.e. case sensitive or not) and as the question didn't specify the collation I took a punt...... and got it wrong! Hey Ho. 😀


    MCITP
    MCTS - E-Business Card
    Twitter: WWDMark

    Try not! Do or do not, there is no try

    email: info@weekendwebdesign.co.uk
    Personal Website: http://markallen.co.uk/
    Business Website: https://www.weekendwebdesign.co.uk

  • Nice question, thanks Ron. I went for case insensitive, but wasn't entirely sure that was the way to go.

    Dave Morris :alien:

    "Measure twice, saw once"

  • Terrible question! Why?? Because it reminded me that I still am stuck with 2008R2. 😀

    Just kidding -- but anyway, good question.

  • 2008R1 tells me:

    Msg 102, Level 15, State 1, Line 9

    Incorrect syntax near '='.

    It doesn't appear to like the @a = @B.

    Tony
    ------------------------------------
    Are you suggesting coconuts migrate?

Viewing 15 posts - 1 through 15 (of 45 total)

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