Query to get Weekly Report
792290Apr 13 2011 — edited Apr 13 2011Hello,
I wrote a query to get weekly report, which should start from Sunday to Saturday a typical week. for example the week is 04/03/2011 to 04/09/2011 i run the query on or Job on say on anyday of the week of 04/10/2011, 04.11.2011 etc.. here is my query, but this seems to work from the sysdate to - 7 days which doesn't get the sunday to sat requirement.. can someone please help..
select uid, psn, TO_char(date_in,'mm/dd/yyyy')
FROM TEST
WHERE uid like '%ST%'
and date_in > trunc(SYSDATE) -7
ORDER BY date_in ASC;
Thank you.