Solved

ORACLE DATE / TIME

Posted on 2013-12-21
3
697 Views
Last Modified: 2013-12-22
Hi,
I have a table with field INSERT_DATE" TIMESTAMP(6), adding the date/time when the record was inserted.
 I need to list the records older than 24 and 48 hours...
Thank you
0
Comment
Question by:andrejaTJ
3 Comments
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 125 total points
ID: 39733554
select * from yourtable where insert_date < systimestamp - interval '24' hour;

select * from yourtable where insert_date < systimestamp - interval '48' hour;
0
 
LVL 31

Expert Comment

by:awking00
ID: 39733706
Records older than 24 hours would include records older than 48 hours. Can you describe how you would like the output to be?
0
 
LVL 37

Accepted Solution

by:
Gerwin Jansen earned 125 total points
ID: 39734686
-- select records older than 24 hours
select * from your_table
where  INSERT_DATE < sysdate -1;

-- select records older than 48 hours
select * from your_table
where  INSERT_DATE < sysdate -2;
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now