I know how to look up this week number:
(SELECT DATEPART(wk, GETDATE()))
I need to know the syntax of getting the week number compare to another table:
SYNTAX:
SELECT THISWEEK -- WEEK NUMBER DATA
FROM dbo.DATETABLE
WHERE THISWEEK = (DATEPART(wk, GETDATE())) -- THIS IS THE PART I AM NOT SURE.
That’s the correct syntax. You have more than the necessary amount of parens, but it does no harm.
Is equivalent to saying: