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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Overlapping dates

Author  Topic 

jayram11
Yak Posting Veteran

97 Posts

Posted - 2010-12-28 : 13:46:49
Hello
I want to find in my table where there are records with overlapping dates eg:

table
PRNO BEG END
70009 2007-10-01 00:00:00 2008-09-30 00:00:00
70009 2008-10-01 00:00:00 2009-09-30 00:00:00
70009 2009-10-01 00:00:00 2010-03-31 00:00:00
70009 2010-04-01 00:00:00 2010-12-31 00:00:00
70009 2010-10-01 00:00:00 2045-12-31 00:00:00

the 4th and 5th record for this PRNO overlap

Thanks


jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-12-28 : 14:09:28
Search this site for "overlapping" and you'll get many results and can choose the one that suits you best!

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

jayram11
Yak Posting Veteran

97 Posts

Posted - 2010-12-28 : 14:32:48
Thanks I did get it.
Go to Top of Page
   

- Advertisement -