I need to extract the data from Oracle DB and this is the business requirement:
Need assistance on where clause logic.
This is not an answer.
That would be
select *
from your_table
where date_column =
case when to_char(sysdate, 'dy') in ('sun', 'mon') then next_day(trunc(sysdate) - 7, 'thu')
else trunc(sysdate) - 2
end;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.