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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine tables, duplicate key rows

Status
Not open for further replies.

skipizza

Technical User
Apr 4, 2001
9
US
I would like to combine three Oracle 8i tables into one. However, when combined there are duplicate key rows. How can I delete them or create the combined table without allowing the dupes? Thanks.
 
It would help if you give us the table structures as well as indicating which columns can be joined on and where the duplicate keys are coming from.
 
All 3 tables have same columns.
SQL> desc acma1
Name Null? Type
-------------------- ------------------
k$$oid NOT NULL VARCHAR2(20)
seq$$ NOT NULL NUMBER(11)
value VARCHAR2(20)

The key fields would be k$$oid and value.
 
You may use distinct in your select or just group by all result fields
 
If you do a UNION in your select query, it will automatically perform the DISTINCT.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top