Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

IFF - 1 Expand / Collapse
Author
Message
Posted Wednesday, June 5, 2013 10:31 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 7:50 PM
Points: 5,618, Visits: 25,235
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

Before posting a performance problem please read
Post #1460517
Posted Wednesday, June 5, 2013 10:52 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 11:24 PM
Points: 788, Visits: 646
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"
Post #1460520
Posted Wednesday, June 5, 2013 11:21 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, February 6, 2014 4:15 AM
Points: 1,242, Visits: 1,546
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 !!!
www.GrowWithSql.com

Post #1460521
Posted Thursday, June 6, 2013 12:25 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, June 24, 2014 6:38 PM
Points: 1,371, Visits: 1,560
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"

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
Guidelines for answers on Performance questions

Link to my Blog Post --> www.SQLPathy.com

Follow me @Twitter

Post #1460537
Posted Thursday, June 6, 2013 1:03 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 2:55 AM
Points: 1,337, Visits: 485
Collation, collation, collation....
Post #1460543
Posted Thursday, June 6, 2013 1:40 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, September 17, 2014 12:53 AM
Points: 2,529, Visits: 2,402
palotaiarpad (6/6/2013)
Collation, collation, collation....

If not specified, the default collation always is CASE INSENSITIVE.
Post #1460557
Posted Thursday, June 6, 2013 2:08 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, January 3, 2014 3:18 AM
Points: 341, Visits: 186
Why does 'r ' = 'R' evaluate to true?

Steve
Post #1460568
Posted Thursday, June 6, 2013 2:10 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: 2 days ago @ 2:31 AM
Points: 769, Visits: 845
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?
Post #1460569
Posted Thursday, June 6, 2013 2:32 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, May 27, 2014 5:28 AM
Points: 250, Visits: 176
default collation is choosen at installation process - so imo it could be CS_AS.
Post #1460574
Posted Thursday, June 6, 2013 3:04 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 2:08 PM
Points: 8,844, Visits: 9,405
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
Post #1460590
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse