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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Two Table Compare

Author  Topic 

DarioLMou
Starting Member

3 Posts

Posted - 2012-04-11 : 08:29:45
Good Day All,

I have table A with following columns:
*CallName
*CallTel
*CallEmail

I have table B with same columns.

Basically I want to display all 3 columns from table A,
WHERE
The record(row) does not appear in Table B.

So if all 3 columns on one record(row) in Table A is not in Table B, then display that record for me.

Any help

Thanks
Regards
Dario

DarioLMou
Starting Member

3 Posts

Posted - 2012-04-11 : 08:30:57
Sometimes CallName for example will exist in table B but for that specific record the Tel and Email may be different.

I only want records where all 3 columns (or at least one) are unique in ONE record....
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2012-04-11 : 08:43:13
SELECT CallName,CallTel,CallEmail
FROM TableA
EXCEPT
SELECT CallName,CallTel,CallEmail
FROM TableB


Jim


Everyday I learn something that somebody else already knew
Go to Top of Page
   

- Advertisement -