I need to know how to write the following SQL statement in Teradata SQL Assist:
CASE WHEN DATEPART(WEEKDAY,GETDATE()) = 2
I know I have to use Current_Date instead of the GETDATE() function.
When does your week start, Sunday or Monday?
All the sys_calendar colunms are available as functions, too:
-- week starts on Sunday:
-- week starts on Monday
Thanks Rglass, that's exactly what I needed.
Thank you also Dieter, our workweek starts on Sunday (day 1), but on Mondays (day 2) I use a case statement to look back two days when pulling data as opposed to just looking back one day when the code is ran Tues through Sat.