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!

select transactions between timestamp minus Systimestamp not working

714712Dec 14 2010 — edited Dec 15 2010
Hi there,

Hoping someone may be able to help.
I have a Timestamp column in my database. I'm trying to do a count of all transactions that were generated in the last 2 hours.
I've tried:
Select *
from table
where column(is a timestamp column) > (systimestamp - interval '2' hour).
This returns all results including ones greater than 2 hours ago.

Appreciate if someone could advise what I've done wrong.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2011
Added on Dec 14 2010
6 comments
718 views