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 Monday, April 7, 2008 10:58 AM


SSC-Addicted

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

Group: General Forum Members
Last Login: Thursday, September 25, 2014 7:31 AM
Points: 491, Visits: 225
I can understand looking at the QotD as a puzzle sometimes and not always from a 'best practices' perspective.

Good point Steve.
Post #480999
Posted Monday, April 7, 2008 7:07 PM


SSC-Addicted

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

Group: General Forum Members
Last Login: Monday, September 29, 2014 12:11 PM
Points: 423, Visits: 93

I think we should stop this.
Personally I have not put the message claiming nothing, but to joke with the situation.
(See my message emoticons, which are for that)

Nobody will die for a point less so, in my humble opinion, it should not make a scandal of it.

I never would have imagined it was going to create this problem. Had I known beforehand, I do not write anything.

I believe that neither Steve Jones nor the rest of the moderators, deserve to be accused in this way.

Stop, guys, please.



Greetings From Argentina!

Pablo

Post #481243
Posted Monday, April 7, 2008 9:35 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, June 4, 2014 3:27 AM
Points: 313, Visits: 382
Regardless of the presence of dob in the author s answer, I feel that the answer provided by the author is not right.
The first option "Month(join_date) In (1,2,3,4,5,8)" would be the rigth answer with respect to the question he has asked.

A word to the Author of the question:
I suggest you have another look at your question !!
Post #481281
Posted Tuesday, April 8, 2008 9:20 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:42 AM
Points: 3,688, Visits: 72,435
I hate to beat this dead horse, but the corrected question/answer went out today.


Explanation: Either of the first two answers will work. All the month names have at least the letter 'a' once. The month function returns the number of the month, that can be compared against the month number of given months


In Spanish, the month of february is febrero, in french it's Février, etc... and depending on the language settings your SQL server is set to, you'll get different results.
Because of that, datename(m,join_date) like '%a%' is not 100% valid.




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #481668
Posted Tuesday, April 8, 2008 9:44 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, October 4, 2012 9:20 AM
Points: 583, Visits: 1,060
Is the question poster a US citizen by any chance? :D

it would explain the 'english' bias of the question.


Hiding under a desk from SSIS Implemenation Work
Post #481683
Posted Tuesday, April 8, 2008 9:49 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:42 AM
Points: 3,688, Visits: 72,435
Shaun McGuile (4/8/2008)
Is the question poster a US citizen by any chance? :D

it would explain the 'english' bias of the question.


I'm a US Citizen... doesn't change the fact that I'm cognizant of the fact that there are other languages out there.




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #481690
Posted Tuesday, April 8, 2008 9:54 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, October 4, 2012 9:20 AM
Points: 583, Visits: 1,060
So it was not really a bad question....

Just a poorly written set of answers.
--Shaun


Hiding under a desk from SSIS Implemenation Work
Post #481697
Posted Tuesday, April 8, 2008 12:03 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 2:56 AM
Points: 2,842, Visits: 3,876
I like the math here

Correct answers: 72% (966)

--------------------------------------------------------------------------------
month(join_date) in (1,2,3,4,5,8) 61%
datename(m,join_date) like '%a%' 37%
Not in List 26%
--------------------------------------------------------------------------------

Or was Steve just hacking into the table directly :D

I also had it wrong, but how do ya say? *$%# happens.
Let he who is without bugs, cast the first stone... (it's
not me of course)


Best Regards,
Chris Büttner
Post #481778
Posted Wednesday, April 9, 2008 6:24 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, July 6, 2011 8:53 AM
Points: 292, Visits: 118
... And what about the Not in List option? I didn't see DATEPART(month,join_date) in (1,2,3,4,5,8) in the list, so that should be a valid option too
Post #482696
Posted Thursday, April 10, 2008 4:23 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
The first option is the only correct one when you take into account languages etc. The second option only true for some languages.
Post #482892
« Prev Topic | Next Topic »

Add to briefcase «««678910»»

Permissions Expand / Collapse