Hi
Is there a better way of writing this below
CASE WHEN day(cur_dt) = ‘MONDAY’ THEN ADD_DAYS(cur_dt,0) WHEN dayname(cur_dt) = ‘TUESDAY’ THEN ADD_DAYS(cur_dt,-1) WHEN dayname(cur_dt) = ‘WEDNESDAY’ THEN ADD_DAYS(cur_dt,-2) . . . so on till Sunday
Any idea
Thanks
rajx72 (BOB member since 2006-08-02)
Hi,
It’s hard to tell because you did not explain what you are actually trying to achieve.
Marek Chladny (BOB member since 2003-11-27)
Sorry, In a hurry opened the question in wrong place.
I am looking at FIRST day of week…