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 «««678910

Query Expand / Collapse
Author
Message
Posted Tuesday, April 15, 2008 6:34 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, May 25, 2012 8:08 AM
Points: 496, Visits: 508
The second option would fail if the month name is only 'Feb' there is no 'a' in it.... so my answer is correct!
Post #484940
Posted Tuesday, April 15, 2008 7:19 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, January 6, 2012 2:39 PM
Points: 954, Visits: 683
abhijeetv (4/15/2008)
The second option would fail if the month name is only 'Feb' there is no 'a' in it.... so my answer is correct!

Since the statement used returns the entire word, and not the abbreviation (language spelling excluded) your answer is WRONG!

Why we have to continue to belabor this point, I have no idea. The person who wrote the question tried. Everyone here was enlighted to all the issues that can arise, and it stirred a great deal of very very good discussion.

However, comments like "I was right, and you were wrong, is just childish." Grow up!
Post #484987
Posted Tuesday, April 15, 2008 11:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 31, 2009 4:31 AM
Points: 5, Visits: 7
No arguments there about the full word. just that why go checking for alphabets when it can be done simply. what if the months i needed did not have a common alphabet. but yea i wont moan any more... im all grown up sigh!!! koi lauta de mera bachhpan....
Post #485214
Posted Friday, April 18, 2008 9:51 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, April 8, 2014 6:32 PM
Points: 82, Visits: 73
Even if the dob issue is disregarded, and if we disregard the fact that 'Feb' doesn't contain the letter 'a', it's really atrocious to use a where clause like the one in the second "correct" answer. Why would anybody ever do that?
Post #487332
Posted Sunday, January 24, 2010 11:18 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, January 3, 2014 7:16 AM
Points: 484, Visits: 45
Using IN (1 ... 12) is safer. Using LIKE %a% is unsafe because in human languages other than English the spelling of month names may not provide the expected result.

Regards, Jon Summers
Post #852759
Posted Thursday, April 22, 2010 7:36 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:16 PM
Points: 7,738, Visits: 9,487
Hugo Kornelis (4/7/2008)
Hi all,

In contrast to some other people in this discussion (and in many other QotD related discussions), I really don't care about points. Points are just a fun way to attract more audience to what should be a mix of fun and education. And the latter (the educational part) is what worries me when I see incorrect answers being marked as correct - and worries me even more when I see absolute bad practices being advertised as a correct answer, without even a disclaimer that this should never be done in a real system.

I'm inclined to agree with all of that comment, inclusing the bit not quoted.
I'd also thow in the comment that since there are a finited number of months in a year a predicate of the form month(join_date) in <list> must have a matching predicate of the form month(join_date) not in <list> so that if one could be right so could the other. So as well as the trivial mistype and the not-so-trivial assumptions about collation and locale it's probably also wrong to reject the third option, since people will surely interpret "list" as a placeholder in teh code for the appropriate list.


Tom
Post #909116
« Prev Topic | Next Topic »

Add to briefcase «««678910

Permissions Expand / Collapse