Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 IFF - 1 Rate Topic Display Mode Topic Options
Author
 Message
 Posted Friday, June 7, 2013 9:16 AM
 Right there with Babe Group: General Forum Members Last Login: 2 days ago @ 9:23 PM Points: 746, Visits: 416
 WWDMark (6/6/2013)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. +1
Post #1461131
 Posted Friday, June 7, 2013 2:26 PM
 Forum Newbie Group: General Forum Members Last Login: Tuesday, August 9, 2016 9:00 AM Points: 5, Visits: 88
 why does 'r ' = 'R'this is like saying Length or 2 = Length of 1in the problem it is small r + a blank space set = capitol RLength of the left side is 2 <> Length of the right side of 1therefore it should answer nonot yeswhy is this not true?
Post #1461218
 Posted Friday, June 7, 2013 2:27 PM
 Forum Newbie Group: General Forum Members Last Login: Tuesday, August 9, 2016 9:00 AM Points: 5, Visits: 88
 why does 'r ' = 'R'this is like saying Length or 2 = Length of 1in the problem it is small r + a blank space set = capitol RLength of the left side is 2 <> Length of the right side of 1therefore it should answer nonot yeswhy is this not true?
Post #1461221
 Posted Friday, June 7, 2013 2:34 PM
 SSCertifiable Group: General Forum Members Last Login: 2 days ago @ 1:49 AM Points: 7,765, Visits: 11,372
 eric larocca (6/7/2013)why does 'r ' = 'R'this is like saying Length or 2 = Length of 1in the problem it is small r + a blank space set = capitol RLength of the left side is 2 <> Length of the right side of 1therefore it should answer nonot yeswhy is this not true?Please read the posts already made, as they answer this question. If anything is unclear after reading the existing discussion, feel free to ask. Hugo Kornelis, SQL Server MVPVisit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1461223
 Posted Tuesday, June 11, 2013 1:45 PM
 Right there with Babe Group: General Forum Members Last Login: Tuesday, March 17, 2015 12:29 PM Points: 794, Visits: 1,197
 Hugo Kornelis (6/6/2013)Joseph M. Morgan (6/6/2013)The first string has a space after the letter, the second does not. Without a Trim, why are they equal? Case sensitivity is irrelevant. The two strings aren't equal.Trailing blanks are trimmed before string comparison. This is documented in Books Online.What I am wondering, though, is why the question explicitly introduces both lowercase and uppercase. I now had to take a 50% gamble as to the default collation used by the author's server. Why not either use the same case for both, or explicitly specify the collation?+1
Post #1462358
 Posted Thursday, June 13, 2013 5:08 AM
 SSC Eights! Group: General Forum Members Last Login: Tuesday, April 15, 2014 8:03 AM Points: 825, Visits: 319
 L' Eomot Inversé (6/6/2013)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.I think I've seen in the discussions of previous questions that where something isn't specified it's reasonable to assume the system has been set up with installation defaults. That's the way I read this and, from a previous QotD, I know the installation default is case insensitive so I got this right.However, there are an awful lot of installation defaults that I don't know so I agree it would useful to have anything that applies to a QotD to be stated positively at the start.
Post #1462983
 Posted Tuesday, June 18, 2013 2:37 PM
 SSC-Insane Group: General Forum Members Last Login: Monday, November 21, 2016 11:03 AM Points: 20,009, Visits: 18,255
 Thanks for the question Ron. Jason AKA CirqueDeSQLeilI have given a name to my pain...MCM SQL Server, MVPSQL RNNRPosting Performance Based Questions - Gail Shaw
Post #1464879
 Posted Wednesday, June 19, 2013 1:38 AM
 Hall of Fame Group: General Forum Members Last Login: Monday, May 23, 2016 5:31 AM Points: 3,615, Visits: 2,774
 I was wondering why so many questions regarding the collation. In a normal scenario it should be considered as the default behaviour for the question which is CI (and not CS). I feel it was a great example of simple QOTD.
Post #1464976
 Posted Wednesday, June 19, 2013 2:01 AM
 SSCertifiable Group: General Forum Members Last Login: 2 days ago @ 1:49 AM Points: 7,765, Visits: 11,372
 sqlnaive (6/19/2013)In a normal scenario it should be considered as the default behaviour for the question which is CI (and not CS).I disagree, and I'll tell you why.In questions where collation is not a factor, using the consistent case throughout the question prevents ambiguity. If you ensure the question works okay onm a CS collation, it will also be okay on a CI collation. The reverse is not true. So writing the question for a CS collation is the best way to ensure that everyone has a fair chacne - including those who are aware that not all SQL Server instances in the world are installed on a CI collation.And in questions where collation is a factor, the collation should always be included in the question, so there can never be a problem there. Hugo Kornelis, SQL Server MVPVisit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1464982
 Posted Wednesday, June 19, 2013 4:06 AM
 Hall of Fame Group: General Forum Members Last Login: Monday, May 23, 2016 5:31 AM Points: 3,615, Visits: 2,774
 Agreed Hugo. That should be the case ideally. However probably I was not clear. What i wanted to say here was that the emphasis should be given based on the question's subject. As in this scenario the question was for IFF category in SQL 2012 environment. The different cases of value ('r' or 'R') may raise doubt in mind but in such case obviously we should go with default settings. Maybe I'm thinking too liberal on this.
Post #1465040

 Permissions