friends...
I'm trying to solve this tricky sql query for sometime but not able to progress when it comes to date....
Q.
Query dba_objects and list all tables created yesterday 'sysdate - 1' and in another column list all tables created 'sysdate - 7'
--below query gives me for yesterday but not sure how to have "Last_week" column populated.. maybe self join?
select owner, object_name, to_char(created, 'MM-DD-YYYY HH24:MI:SS') "Yesterday", to_char(created, 'MM-DD-YYYY HH24:MI:SS') "Last_Week"
from dba_objects
where object_type = 'TABLE'
and created >=trunc(sysdate - 1)
and created < trunc(sysdate)
appreciate your time and efforts in looking this..
thanks
Edited by: khallas301 on Mar 19, 2013 9:27 AM
typo edited.. thanks to frank