Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Dating for DBAs - a second date


Dating for DBAs - a second date

Author
Message
M&M
M&M
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2595 Visits: 3898
Good question, but tough to get it right :-)

M&M
Surii
Surii
Say Hey Kid
Say Hey Kid (697 reputation)Say Hey Kid (697 reputation)Say Hey Kid (697 reputation)Say Hey Kid (697 reputation)Say Hey Kid (697 reputation)Say Hey Kid (697 reputation)Say Hey Kid (697 reputation)Say Hey Kid (697 reputation)

Group: General Forum Members
Points: 697 Visits: 489
Excellent question. Keep them coming Duncan.
Cliff Jones
Cliff Jones
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4069 Visits: 3648
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.
UMG Developer
UMG Developer
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2280 Visits: 2204
CirquedeSQLeil (4/13/2011)
paul.knibbs (4/13/2011)
Oh, I agree, the question was perfectly clear--... :-D


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.
Rich Mechaber
Rich Mechaber
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1087 Visits: 3661
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
TomThomson
TomThomson
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10731 Visits: 12019
CirquedeSQLeil (4/13/2011)
paul.knibbs (4/13/2011)
Oh, I agree, the question was perfectly clear--... :-D


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

SanDroid
SanDroid
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1414 Visits: 1046
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? Blink


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.
tilew-948340
tilew-948340
SSChasing Mays
SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)

Group: General Forum Members
Points: 629 Visits: 2437
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!
Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3396 Visits: 1552
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!
Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3396 Visits: 1552
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search