Question

Oracle reader: read only records between now and a timestime 7 days ago.


Badge

Hi,

So I have an oracle database with oracle timestamps as one of the columns. How can I make it so the reader only reads records between today and 7 days ago based on that timestamp? Otherwise I'll be reading millions of useless records

Thanks so much!

 


3 replies

Userlevel 4

You can use a where-clause on the reader, e.g.

mytimestamp > sysdate-7
Userlevel 1
Badge +10

You can use a where-clause on the reader, e.g.

mytimestamp > sysdate-7
mytimestamp > trunc(sysdate - 7)
This is better if wanting the past 7 days rather than 168 hours ago
Userlevel 2
Badge +12

Or trunc(sysdate) - trunc(mytimestamp) < 8

In cases you use 7 you probably want the <= (less or equal).

Reply