Question Locked

Selecting last inserted/updated records in oracle using timestamps

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Someone to help me out in selecting the records in a table inserted or updated in the current day?

During the day there are 3 inserts/updates. How can I select these records, right after the insert/update using scn/timestamps?

There is a date column in the table but if I use it the query takes lots of time to finish as I got millions of records in the table...

I appreciate very much some help.

Heitor

3 replies

by tony hopkinson

Have a daily table that will hold the data you want to report on.
insert a new or update and existing record to it. Write the report on that.

Then all you need is a query to housekeep out old data, so it doesn't get too big.

by heitor.filho

Tony,

thanks for your reply. I thought about it too, but the point is that there are a lot, really a lot of COBOL routines inserting/updating the tables in a mainframe. In order to create a table to hold the data I would had to update all those cobol apps. Do you see any other option besides that?

This discussion is closed to new replies.