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

Duplicate in another table

Status
Not open for further replies.

sinCity99

Programmer
Jan 21, 2009
20
0
0
US
Hi,

I need a way to eliminate data from table A if it exists in table B. I need to combine these two tables but show their similar data only once..how can i do that?

Example:

Table B data:
john 10/11/2008 book
john 5/10/2008 novel


table A fields:
john 10/11/2008 book


Results that i need:
john 10/11/2008 book
john 5/10/2008 novel

No, i cannot only show table B's data because there might be data in table A that are not in table B.
 
Select * from tablea
union select * from tableb
 
Is the "union" going to eliminate the duplication?
 
hum..i guess it will..i was sure i did that previously and i still had duplicates. I guess i didn't go that route because i needed to do a stored procedure with a union and that didn't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top