Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find records where dates equal for same ID

Status
Not open for further replies.

mkallover

Programmer
Feb 6, 2008
88
US
I have a query that I created that finds all the duplicates in a table based on a unique ID. Now what I would like to do is narrow that query down to find only those records where:

1. ID's are equal

AND

2. A field called "SANC_DATE" is equal for those IDs

I don't even know where to start here.

Example:

Code:
ID    | SANC_DATE   | END_DATE
------|-------------|------------
53     01-23-2004    12-31-9999
53     01-23-2004    1-23-2006

I would want to only pull those records where ID and SANC_DATE are equal.
 
What is your actual SQL code ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top