Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Multiple duplicate addresses SQL help?

Multiple duplicate addresses SQL help?

From: Bob Maggio <rmaggio_at_courts.state.ny.usNOSPAM>
Date: Thu, 23 Aug 2001 18:09:08 GMT
Message-ID: <3B854758.5EE0CB0D@courts.state.ny.usNOSPAM>


I need to pull out values from two tables, that contain mustiple address duplicates.
The basic table structure is (without uneeded fields): entity_address
entity_address_id
address_id
end_date

address
address_id
street1
street2
city ....etc

I need to select the addresses that are duplicates for each entity_address, not having an end date of null (the only current address)
So for each entity, I get all their entity_addresses. Of those, I need to get ones that have the same street1, street2, city etc to otheraddresses for that entity, except for the ones that have end_date=null.
My problem is: How can I group together only the addresses that have dupes?
I tried a query that had
group by street1
having count(street1) > 1 but that didn't get me the desired results. Any suggestion on how to grab these?
Thanks
 Bob Maggio Received on Thu Aug 23 2001 - 13:09:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US