Skip to Main Content

Database Software

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!

Query to retrieve previous day data

888905Jun 13 2012 — edited Jun 15 2012
Hi,

I would like to have a query which should fetch previous day records from column which is having timestamp data type.

select mdn from user_table where updatetimestamp > trunc(sysdate) - INTErVAL '24' HOUR;

But this gives output not for previous day, but all records which are 24 hrs less than current day. Any suggestion on how to get records for previous day based on column having timestamp data type.

Thank you in advance.

Cheers,
Suddublr
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2012
Added on Jun 13 2012
4 comments
2,410 views