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 |
cardgunner
326 Posts |
Posted - 2007-11-15 : 11:22:18
|
I'm exhausted thinking about this.Table AID itema 2b 3c 1d 6Table BID Refabcd bI want to my results to beQuery ABID Itema 2c 1so I'm excluding d because ref b and b because it was in the ref column of Table B.Make sense?Card Gunner |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-11-15 : 11:37:25
|
select ta.*from taleft outer join(select Id, Ref from tb where Ref is not null) tbon ta.ID = tb.ID or ta.ID = tb.Refwhere tb.ID is null==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
cardgunner
326 Posts |
Posted - 2007-11-15 : 12:08:36
|
Wow, Perfect!Thank you and have a Great Thanksgiving!Card Gunner |
 |
|
|
|
|