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

Dating for DBAs - a second date Expand / Collapse
Author
Message
Posted Wednesday, April 13, 2011 9:53 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, April 14, 2014 5:49 PM
Points: 2,263, Visits: 3,758
Good question, but tough to get it right

Mohammed Moinudheen
Post #1092960
Posted Wednesday, April 13, 2011 9:55 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, November 04, 2013 4:02 PM
Points: 659, Visits: 474
Excellent question. Keep them coming Duncan.
Post #1092965
Posted Wednesday, April 13, 2011 10:00 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: Yesterday @ 7:59 AM
Points: 3,773, Visits: 3,589
A very good question. It is unfortunate that some are not getting the message that it is trying to convey, that not all date formats are portable across all language settings. If you ever have to port your application to a different country or language, this can cause a lot of rework.
Post #1092972
Posted Wednesday, April 13, 2011 10:03 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, March 27, 2014 8:50 AM
Points: 2,163, Visits: 2,184
CirquedeSQLeil (4/13/2011)
paul.knibbs (4/13/2011)
Oh, I agree, the question was perfectly clear--...


I agree - I felt the question was very precise and clear in the meaning and intent.


I can only assume that a lot of people have no idea that date format or language settings exist or what they might do.
Post #1092974
Posted Wednesday, April 13, 2011 10:08 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, April 18, 2014 1:43 PM
Points: 687, Visits: 2,995
Duncan, nice follow-up to your last question. I'm gratified? relieved? to see so many wrong answers, as I thought everyone else but me knew what Tibor Karaszi pointed out in his blog: SQL Server DATETIME and SMALLDATETIME types are not ANSI-compliant.

As a follow-up to this issue, I was quite surprised to learn that (apparently), unless you have purchased and installed a local version of SQL Server, you cannot change the language settings at the server level, only for individual logins or query sessions. (You apparently can issue the command without error, but it makes no difference.) It may be possible to make a registry change to force the language change; see http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=62891.

I cannot find official confirmation of this behavior at Microsoft, but here's a relevant article excerpt from http://www.sqlservercurry.com/2010/11/change-default-language-for-sql-server.html
If you have not installed the localized version of SQL Server, the default language is US English. If you need to change the default language on this machine, then you will have to change the default language for individual logins, as doing it on a server level won't work.


Thanks again for great questions,
Rich
Post #1092983
Posted Wednesday, April 13, 2011 10:59 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 7:47 AM
Points: 8,296, Visits: 8,750
CirquedeSQLeil (4/13/2011)
paul.knibbs (4/13/2011)
Oh, I agree, the question was perfectly clear--...


I agree - I felt the question was very precise and clear in the meaning and intent.

Me too.

It's unfortunate that QotD is unlikely to teach reading comprehension, which has clearly been lacking rather a lot judging by the number of responses that claim all four work.


Tom
Post #1093023
Posted Wednesday, April 13, 2011 2:18 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,232, Visits: 1,046
Duncan Pryde (4/13/2011)
Nakul Vachhrajani (4/13/2011)
Thank-you, Duncan for this wonderful series!


You're welcome - although I'd hesitate to call 2 questions a series! Unless you're expecting more?


I think the awesome title choice gives it that "series" feel.
Nice question, I just need to pay more attention to the "select 2" part next time.
Post #1093176
Posted Wednesday, April 13, 2011 8:54 PM
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: Wednesday, September 25, 2013 5:10 PM
Points: 589, Visits: 2,436
Hi Duncan
About a week ago, you asked just about the same question, with the same words (choices was different) and the language was part of the answer... I should have got this one right... but I did not. I did not think. It was too easy! I knew that all fourth would work on my machine! ... did not think about the language at all... I should remember now! Thanks for the good question!
Post #1093275
Posted Thursday, April 14, 2011 1:06 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: Thursday, April 03, 2014 10:34 AM
Points: 3,352, Visits: 1,478
Cliff Jones (4/13/2011)
A very good question. It is unfortunate that some are not getting the message that it is trying to convey, that not all date formats are portable across all language settings. If you ever have to port your application to a different country or language, this can cause a lot of rework.


It's slightly disappointing that the percentage of right answers is almost exactly the same as last week, but then it often takes a while for new concepts to sink in. Despite being in the UK, most of the servers we deal with are installed with US_English as the default language. I reckon it was several years before people (including me) noticed that the 'yyyy-MM-dd' format didn't work in "British", and I vaguely remember trying to debug an application that used the format and had stopped working when the database was moved to another server. It took ages to work out what the problem was, but once we had, the mistake was never made again!
Post #1093338
Posted Thursday, April 14, 2011 1:11 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: Thursday, April 03, 2014 10:34 AM
Points: 3,352, Visits: 1,478
rmechaber (4/13/2011)
Duncan, nice follow-up to your last question. I'm gratified? relieved? to see so many wrong answers, as I thought everyone else but me knew what Tibor Karaszi pointed out in his blog: SQL Server DATETIME and SMALLDATETIME types are not ANSI-compliant.

As a follow-up to this issue, I was quite surprised to learn that (apparently), unless you have purchased and installed a local version of SQL Server, you cannot change the language settings at the server level, only for individual logins or query sessions. (You apparently can issue the command without error, but it makes no difference.) It may be possible to make a registry change to force the language change; see http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=62891.

I cannot find official confirmation of this behavior at Microsoft, but here's a relevant article excerpt from http://www.sqlservercurry.com/2010/11/change-default-language-for-sql-server.html
If you have not installed the localized version of SQL Server, the default language is US English. If you need to change the default language on this machine, then you will have to change the default language for individual logins, as doing it on a server level won't work.


Thanks again for great questions,
Rich


You can't change the installation language (whatever that means) but you can change the server default language. I did that myself recently, I think following that discussion in which you first posted the Tibor Karaszi link. Once you change the language, all subsequently created logins will use the new default language, but all existing logins will use the previous default language, or whatever language they were created with.
Post #1093341
« Prev Topic | Next Topic »

Add to briefcase «««23456»»

Permissions Expand / Collapse