We have table structure like
id | startDay | startMonth | startYear | endDay | endMonth | endYear
1 | 22 | 12 | 2012 | 25 | 1 | 2013
Now we have another date range like startDate,startMonth, startYear i.e. 25|12|2012 and endDay,endMonth,endYear i.e 10|1|2013.
I want the query to get the records from table where provided date range is present in table. Means record first in this case.
How to write query for this?
First, take @MarcB‘s advice. But if you don’t have time to alter your table, alternatively, you can also use the following query.