I had the table1 as follows:
Now i would like to show all dates between two date ranges (for example 2003-02-12 to 2008-12-30) which-----------------
| table1 |
-----------------
| id | visit_date | no_of_hits |
| 1 | 2002-02-12 | 3 |
| 2 | 2002-02-13 | 10 |
| 3 | 2002-02-15 | 200 |
:
:
| n-1| 2009-01-8 | 125 |
| n | 2009-01-10 | 400 |
may or may not have no of hits.
I know this can be done by using third table (the table that has all the dates) and using it as left join to table1.
I have seen some tutorials regarding sequence generation that is by using integers table as:
We know we can generate sequence of numbers using integers table using the concept of cross joins.----------
|integers|
----------
|i |
----
|0 |
|1 |
|2 |
:
:
|9 |
How this concept can be used in my case ie generating all dates between two date range. or any other good method will do too.
Note: the two date range is not fixed as user has option to select any date.
Waiting for the right solutions.
Thank You.