Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 02-11-2005, 09:51 AM   #1
Beta Member
Join Date: Feb 2005
Posts: 1
Default SQL Help!!!

I'm trying to figure out a query that would look for dupes in two fields and then compare the date spans to ensure no dates over lap.

RowId Contract_Id Product_Id Start_Date End_Date Price
1 1234 5678 1/1/2003 12/31/2003 153.23
2 1234 5678 1/1/2004 12/31/2004 150.45
3 1234 5678 6/15/2004 12/31/2005 151.47

Rows 2 and 3 would be flagged because they have the same product and contract Id's and their dates overlap.

Do you have any suggestions on a query that would spot all of these instances?

Thanks in advance
SoftwareDude is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 12:28 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0