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 ««123»»

ALL Expand / Collapse
Author
Message
Posted Monday, June 30, 2008 5:45 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:36 PM
Points: 6,133, Visits: 8,398
pollockk (6/30/2008)
Maybe that's just because I have been caught by tables with case sensitive collations in real life.


Thanks for the clarification, Kirsty :)

I'm glad you took the question as I think the author intended it, and that you're not one of the whiney "I want my point back" types that this site unfortunately appears to have too many of (I am in fact surprised that as of yet, there still aren't two to three pages of such replies ).

And I know all about being caught by this - most of my databases use a binary collation (for that tiny bit of extra speed :)), so I often have to correct lots of upper-/lowercase problems when copying sample code from any online resource...



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #525816
Posted Monday, June 30, 2008 5:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 31, 2008 2:42 AM
Points: 9, Visits: 24
glad that's sorted then. I'm not even playing for points so any and all comments/questions of mine can be taken to be innocent of motive .
Post #525826
Posted Monday, June 30, 2008 6:00 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: Monday, December 8, 2014 2:50 AM
Points: 733, Visits: 408
just to let you know I'm not picky either. Sorry if I seemed to be from my reply
I just wanted to state that it was confusing (for me at least). Who cares about the points? I'm just here to learn...
Post #525830
Posted Monday, June 30, 2008 6:46 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, April 6, 2009 1:29 PM
Points: 2,057, Visits: 215
I use to worry about the points, but life is too short to worry about such unimportant things like that.
Post #525860
Posted Monday, June 30, 2008 7:13 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, January 8, 2009 1:32 AM
Points: 129, Visits: 35
I just noticed that the answer says "A ->= would return true", while I guess the author had "<=" in mind... ;)

Thanks for the collation hint, I ran into such tricky problems too, a couple of times :)

I considered those values a kind of "meta-values", meaning that they were generic values, so didn't pay much attention to their case
Post #525886
Posted Monday, June 30, 2008 7:37 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, June 26, 2014 6:11 AM
Points: 1,330, Visits: 815
Well, I got caught by the collation thing as well. When I looked at the expression and the values to test, I did go review an ASCII chart before answering. A capital V has a decimal value of 86 while a lower case v has a decimal value of 118. The IF statement is checking to see if 'Value1' is less than ALL of the values returned from the subquery (those values being value1, value2, value3, value4).

'Value1' is obviously less than the last three which left the first one to question. If the database is NOT CaSe sensitive, the result would be 0 since 'Value1' is = to 'value1'.

If the database IS CaSe sensitive, the result would be 1 since 'Value1' is < 'value1'. I answered as if the database were CaSe sensitive and therefore got the answer wrong. There have been CaSe questions before so really, both answers are correct since the collation was not specified as part of the question.

Not a bad question but this small piece of information was left out so it could not be answered correctly.
Post #525914
Posted Monday, June 30, 2008 9:30 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 4:20 AM
Points: 1,808, Visits: 525
Objection!!

Value1 is indeed LESS THAN value1, no matter how many times value1 appears in the table.

Therefore I claim my points.

AND don't claim that you didn't mention case sensitivity, because we don't allow any assumptions! We take it at face value.

Kenneth Spencer


You never know: reading my book: "All about your computer" might just tell you something you never knew!
lulu.com/kaspencer
Post #526038
Posted Monday, June 30, 2008 10:17 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 3:11 PM
Points: 31,368, Visits: 15,837
I'll award points back to you, since the narrow minded US author (me) didn't think in terms of case sensitivity. I'll try to consider that for future questions.

The question has been altered to clarify and correct the Value1 v value1 typo.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #526079
Posted Tuesday, July 1, 2008 2:20 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 4:20 AM
Points: 1,808, Visits: 525
Thanks Steve, that is indeed very kind of you !!
And I won't hold it against you just because you are from the US !!!

Ken.


You never know: reading my book: "All about your computer" might just tell you something you never knew!
lulu.com/kaspencer
Post #526394
Posted Tuesday, July 1, 2008 2:24 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: Monday, December 8, 2014 2:50 AM
Points: 733, Visits: 408

gij onnozel manneke...
Post #526397
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse