I have a param I pass in that is a number representation of the day of Week. It will be either 1 - 5 for Mon - Friday
Its in my Where clause so I am trying to set it to the day of week
heres what I got....
and DATENAME(weekday, wid.WorkDate) = (CASE WHEN @WeekDay = 1 THEN 'Monday' OR CASE WHEN @WeekDay = 2 THEN 'Tuesday' OR CASE WHEN @WeekDay = 3 THEN 'Wednesday' OR CASE WHEN @WeekDay = 4 THEN 'Thursday' OR CASE WHEN @WeekDay = 5 THEN 'Friday' )