How can I create a query wich will display only records beetween two dates regardles the day of the month.
If the parameter date is 10.5.2003,
The first date is 15.5.2003, the second date is 1.7.2003.
The query must display also records between 10.5 and 15.5.
Originally posted by Korado
I would like to display records where the month of the start/end date is between the parameter month date, regardles the day(could be before/after the start/end day date).
Regardless the year?
So, you mean something like:
WHERE month[Parameter Date]) BETWEEN month([Start Date]) AND month([End Date])
This is syntactically correct, including the month() function, but I'm afraid that this isn't what you are looking for. Records with a start date in january and end date december will always fit your condition, regardless your parameter. Records with a start date in december and an end date in january, however, will never fit. So, I recommand re-thinking your problem.
Make everything as simple as possible, but not simpler! - A. Einstein
DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool