SQL Clone
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
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

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

M&M
Surii
Surii
SSC Eights!
SSC Eights! (805 reputation)SSC Eights! (805 reputation)SSC Eights! (805 reputation)SSC Eights! (805 reputation)SSC Eights! (805 reputation)SSC Eights! (805 reputation)SSC Eights! (805 reputation)SSC Eights! (805 reputation)

Group: General Forum Members
Points: 805 Visits: 489
Excellent question. Keep them coming Duncan.
Cliff Jones
Cliff Jones
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5133 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
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3916 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
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: 2643 Visits: 3671
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
Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25188 Visits: 12488
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
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2358 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
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: 1127 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
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: 4124 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
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: 4124 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