I need to select the previous Sunday's date. I've Googled, and nothing i try works.
The date is called AS_OF_DATE.
I need to SELECT MAX(AS_OF_DATE) WHERE the day of the week is Sunday.
I don't know what report you are talking about, but the "how to select a particular day" problem is very googleable .
I figured it out finally. It's
where as_of_date = (SELECT TRUNC(SYSDATE)-(select to_char(sysdate-1, 'd') FROM DUAL) FROM DUAL)
1 Like