I have a monthly partitioned table in Oracle by a DATETIME column. This table contains > 6 billion rows. Now I want to filter this table using sysdate. Thus, I can write queries using relative date as, for instance, yesterday, last weekday, last year etc...
So, what I looking for is something like below code that works:
SELECT *
FROM BIG_PART_TABLE PARTITION FOR (DATE **TODAY**)
WHERE TRUNC(DATETIMECOLUMN) = TRUNC(SYSDATE)
But obviously, that won't work.
Do you have any ideas so I can get it to work?
Thanks!