Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get records based on timestamp

555097Aug 20 2008 — edited Aug 20 2008
Hi All,

I have a table with three columns StudentId, Status, Time_Stamp
Here's the sample data.

StudentId Status Time_Stamp
------------------------------------------------
100 1 8/18/2008 4:58:28.000000 PM -05:00
101 2 8/18/2008 4:50:28.000000 PM -05:00
102 1 8/18/2008 4:52:28.000000 PM -05:00
103 3 8/18/2008 5:58:28.000000 PM -05:00
104 1 8/18/2008 4:51:28.000000 PM -05:00

My question is I want to get all the records where Status=1 and last update to their
Status occured more than X minutes ago. Where X could be any number of minutes.
For example I want to get all records for 5 minutes.

please help me to slove this problem.

any help is highly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2008
Added on Aug 20 2008
10 comments
1,249 views