September 12, 2013 at 11:28 pm
Thanks 🙂
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
September 13, 2013 at 12:27 am
Very nice question to close off the week.
And kudos for mentioning the default language, so there's less whining in the discussion 😀
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
September 13, 2013 at 12:49 am
Clear and easy question!
Thanks:-)
September 13, 2013 at 12:54 am
Carlo Romagnano (9/13/2013)
Clear and easy question!Thanks:-)
+1
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
September 13, 2013 at 1:00 am
The scope of "set language" and "set datefirst" is per session and also per procedure/function
Try this:
create procedure proc_datefirst
as
set language 'us_english'
select @@DATEFIRST
go
set language 'Italian'
exec proc_datefirst
select @@DATEFIRST
September 13, 2013 at 1:32 am
This was removed by the editor as SPAM
September 13, 2013 at 2:47 am
Good one, thank you for the post.
(so close, and I got this wrong :crying:. Note to self: "connection" and "session" are two different things.)
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
September 13, 2013 at 3:38 am
Carlo Romagnano (9/13/2013)
The scope of "set language" and "set datefirst" is per session and also per procedure/functionTry this:
create procedure proc_datefirst
as
set language 'us_english'
select @@DATEFIRST
go
set language 'Italian'
exec proc_datefirst
select @@DATEFIRST
Easy question...
September 13, 2013 at 4:10 am
Interestingly enough running this in UK, on SQL Server 2012 SP1
I got
us_english
7
2
3
tried it on two 2012 builds got the same result.
Also same result on 2008 R2 dev edition.
And on 2008 sp 3 enterprise edition.
Cheers,
Rodney
September 13, 2013 at 4:12 am
Silly me, didn't have coffee yet and missed the second part!
Yes per session!! So new session will be 7
Rodders...
September 13, 2013 at 5:43 am
Thanks! I will be posting some more in the future. I'm glad you liked it! 😉
September 13, 2013 at 6:39 am
Thanks for the question!
BTW, I got tired of seeing Steve go on vacation. So, I'm going on one too. Two weeks in Greece, or ????da. The ONLY thing I'll miss about work is doing the QotD every morning. 😉
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
September 13, 2013 at 6:56 am
Interesting, good question...
September 13, 2013 at 7:57 am
Great question to end the week on
Viewing 15 posts - 1 through 15 (of 28 total)
You must be logged in to reply to this topic. Login to reply