What do you mean by "missing dates"? Do you need EVERY DAY to be listed intable? In this case you may try this query:
select * from
(select <start date> - 1 + rownum day
from all_objects
where rownum < <date interval>)
where not exists(select 1 from <your table>
where <date column> = day)
It's asumed that all_objects contains not less than <date interval> records.
The table has roughly 70,000 records per day that we receive a file. There are days we didn't receive a file for both valid reasons (weekends/holidays) and invalid reasons (FTP failed, no file provided, etc)
I am trying to find the days missing so that I know what days to attempt to retrieve.
select * from
(select to_date('12292000', 'MMDDYYYY') - 1 + rownum day
from all_objects
where rownum < 844)
where not exists(select 1 from t_positions_arc
where record_date = day)
AND TO_CHAR(DAY,'DAY') NOT IN ('SATURDAY ','SUNDAY ')
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.