SyntaxFix
Write A Post
Hire A Developer
Questions
I think this could work:
select case when datepart(dw,[Date]) = 1 then 7 else DATEPART(DW,[Date])-1 end as WeekDay