Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Merging data

Author  Topic 

raddy
Starting Member

12 Posts

Posted - 2008-06-03 : 15:46:02
I have 2 tables that have the exact same structure and have some common values.
T1 = a,b,c,d,e
T2 = e,f,g,h

I want to create a single distinct table which captures all unique in both tables. I have a common fields ID in both, I can match on. I don't want duplicates which is what's happening now..

CombinedT = a,b,c,d,e,f,g,h

Thanks.

jdaman
Constraint Violating Yak Guru

354 Posts

Posted - 2008-06-03 : 15:48:38
select * from T1
union
select * from T2
Go to Top of Page

raddy
Starting Member

12 Posts

Posted - 2008-06-03 : 16:19:48
Thanks, but I should have mentioned am tryin this in Access. Sorry.
:)
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-03 : 16:22:20
Then put in Access forum.
Go to Top of Page
   

- Advertisement -