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 |
|
U A
Starting Member
11 Posts |
Posted - 2010-12-22 : 07:02:15
|
| i have three columns 1)personid, 2)start date and 3)end dateI have to check whether person id is already there between two dates ie) projected_start_date and projected_end_dateplease help regarding thisThank YouU A |
|
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-12-22 : 07:13:21
|
| SELECT * FROM Table WHERE StartDate >= Projected_start_date AND EndDate <=Projected_end_DateVaibhav TIf I cant go back, I want to go fast... |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-12-22 : 07:20:20
|
And for partial presence...SELECT PersonID, StartDate, EndDate FROM Table1WHERE StartDate <= @EndDate AND EndDate >= @StartDate N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|
|