I want to pull all the rows from a database for a month and if there are any rows in the beginning or in the end that are missing then I want to create fake rows, so every day there is a schedule that one has to follow. How can I detect missing rows or how can I solve this issue?
A:
From how to fill up the missing dates ??
fill a calendar table use that as your driving table (i.e. first one in your select) and do a LEFT JOIN on it.
astander
2010-02-18 08:18:17
but i would need to create 3 more tables to do that or is there other way around it without creating date table?
Basit
2010-02-18 09:22:38