Sunday, February 19, 2012

datename problems

Thanks for the reply SG,

I tried the Set Datefirst prior to running my query and i got exactly the same results (screenshot attached). I even verifird the Datefirst value immediately prior to running my query.

I suspect you are right however. Are there any other settings i should look at? would it be a service pack issue?

thanks

ozzThis mistake is at datename(dw,day(Saledate)).
You must change to
select datename(dw,Saledate) as ....

See my examples:

No comments:

Post a Comment