Tag Archive: Dates

Find All Missing Dates in a SQL Table

I have a table of Exchange Rate Histories that I maintain. There is a job that pulls Exchange Rate Information from Google and populates in this table everyday. Sometimes data is not available/the job is missed for various reasons, in this case I need to find all missing dates for each currency in the SQL table. In the example below I am finding all missing dates in the table but you can update this to look in smaller segments.

  SQL script to find all missing dates for each currency in the SQL table.