Is anybody to know how to enumerate all week’s days in T-SQL, so that we have in the ouput a string like: ‘Sunday, Monday, Tuesday, …’
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A straight select that will work with any
SET DATEFIRSTsettingIf you don’t care about region (Monday or Sunday as first day of week), then just
It will perform much better than going through CTE and will also work in 2000 should you ever need it.