Hello I need a CASE statement that will be marking data that was one week before. CASE statement that will mark data '1 week before'. it should basically mark rows where 'STARTDATE' is equals to one week before. If today (1/13/2021) it should look at the data '1/2/2021' and return 'Data one week before'. This column has only Sunday dates namely 1/02, 1/09 etc. I need this column to return value 'Data one week before' if it equals to 1/02 for example today. This query should be dynamic and readjust itself each week.
SELECT [DMDUNIT]
,[LOC]
,[MODEL]
,[JOBID]
,[USERID]
,[FCSTDATE]
,[STARTDATE] FROM [BYIntegration].[SCPOMGR].[FCSTPERFSTATIC]
Please let me know if someone knows how to do it.