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
 Joining 3 table

Author  Topic 

rds207
Posting Yak Master

198 Posts

Posted - 2010-05-28 : 13:28:33
Hi

I have 3 tables :

dw_t_ec_sba
dw_t_ec_tgt
dw_t_ec_hci_brew

which has a column jobname which is equal to jobname in table dw_t_ec_job
I need to select the Jobnames which are not there in above 3 tables but there in dw_t_ec_job table ,

Could any one please assist me with this query ...

tmaiden
Yak Posting Veteran

86 Posts

Posted - 2010-05-28 : 14:39:45
SELECT jobname
FROM dw_t_ec_job
WHERE jobname NOT IN (SELECT jobname FROM (
SELECT jobname
FROM dw_t_ec_sba
UNION
SELECT jobname
FROM dw_t_ec_tgt
UNION
SELECT jobname
FROM dw_t_ec_hci_brew
) I )
Go to Top of Page
   

- Advertisement -