Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rahulpatel112
Starting Member
4 Posts |
Posted - 2012-05-03 : 03:22:12
|
Hello friends,I need query which will check user supplied date range is in between the existing table startdate and enddate.if any of the date of user supplied date range is in between the tables start date and end date,it should retrun that record from table.for example user supply date range is from 1 may 2012 to 5 may 2012.then query must check that 1 may 20052 may 20053 may 20054 may 20055 may 2005(all dates) is in between startdate and enddate of existing table.please reply...Thanx in advance R.J.PATEL |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2012-05-03 : 03:48:47
|
SELECT * FROM dbo.Table1 WHERE DateColumnInTable BETWEEN @FromDate AND @ToDate N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|