I have part of SQL Query.
This SQL Query is no different than other, but only difference is, that ?DATE1::? is custom built for a web-based reporting tool.
Meaning ?DATE1::? will give user to pick date from drop down menu. I can use ?DATE1::? or enter dates manually in query like 05-01-2012
Here is the where clause:
WHERE To_Date(to_char(B.startdatetime, 'DD-MON-YYYY')) >= To_Date('?DATE1::?','MM/DD/YYYY')
and To_Date(to_char(B.enddatetime, 'DD-MON-YYYY')) <= To_Date('?DATE2::?','MM/DD/YYYY')
How can I change the query so user cannot pick more than 7 days of the date range?
add this condition aslo
mysql
Oracle