2
I have the following SQL query that computes for every date the week it falls in (a week begins on Sunday and ends on Saturday):
SELECT EntryDate
,CAST(DATEADD(DAY, 1-DATEPART(WEEKDAY, EntryDate), EntryDate) AS DATE) AS 'SundayDate'
,CAST(DATEADD(DAY ,7-DATEPART(WEEKDAY, EntryDate), ...