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 |
magmo
Aged Yak Warrior
558 Posts |
Posted - 2014-09-27 : 04:02:45
|
HiI have 3 tables, 2 of them are inner joined on a varchar column (bookname) which is fine. But if this "bookname" is present in table 3 I don't want to display it in the result, can someone please show me how to do this? |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-09-27 : 07:25:09
|
quote: Originally posted by magmo HiI have 3 tables, 2 of them are inner joined on a varchar column (bookname) which is fine. But if this "bookname" is present in table 3 I don't want to display it in the result, can someone please show me how to do this?
Select ...From table1 Join table2 ...Where bookname not in (select book name from table3) |
|
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2014-09-29 : 01:11:07
|
Ahh, thanks a lot! |
|
|
|
|
|