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.
| Author |
Topic |
|
Shastryv
Posting Yak Master
145 Posts |
Posted - 2004-09-13 : 15:06:15
|
| Have 4 table and I need to find out the list of the rows that are present in Table A and doesn’t exist in either table B or Table C or table D. |
|
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2004-09-13 : 15:12:42
|
| select ...from ...where not exists (select * from tableB where tableAColumn = tableBColumn)AND not exists (select * from tableC where tableAColumn = tableCColumn)AND not exists (select * from tableD where tableAColumn = tableDColumn)Theres probably a faster way to do it with left outer joins. |
 |
|
|
hgorijal
Constraint Violating Yak Guru
277 Posts |
Posted - 2004-09-14 : 02:15:17
|
| select A.* from Aleft outer join B on A.column = B.columnleft outer join C on A.column = C.columnleft outer join D on A.column = D.columnwhere B.column is null and C.column is null and D.column is null Hemanth GorijalaBI Architect / DBA |
 |
|
|
|
|
|