June 5, 2013 at 10:52 pm
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:
June 5, 2013 at 11:21 pm
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 !!!
June 6, 2013 at 12:25 am
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
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
June 6, 2013 at 1:03 am
Collation, collation, collation....
June 6, 2013 at 1:40 am
palotaiarpad (6/6/2013)
Collation, collation, collation....
If not specified, the default collation always is CASE INSENSITIVE.
June 6, 2013 at 2:08 am
Why does 'r ' = 'R' evaluate to true?
Steve
June 6, 2013 at 2:10 am
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?
June 6, 2013 at 2:32 am
default collation is choosen at installation process - so imo it could be CS_AS.
June 6, 2013 at 3:04 am
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
June 6, 2013 at 3:57 am
This was removed by the editor as SPAM
June 6, 2013 at 4:33 am
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.
email: info@weekendwebdesign.co.uk
Personal Website: http://markallen.co.uk/
Business Website: https://www.weekendwebdesign.co.uk
June 6, 2013 at 5:49 am
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"
June 6, 2013 at 5:57 am
Terrible question! Why?? Because it reminded me that I still am stuck with 2008R2.
Just kidding -- but anyway, good question.
Viewing 15 posts - 1 through 15 (of 45 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy