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 |
|
dendeze
Starting Member
2 Posts |
Posted - 2010-07-08 : 07:56:24
|
| Hey,I have two tablestable1 with fields :veld1table2 with fields: veld1values in table1: A, B, Cvalues in table2: B,C,Dthrough next sqlselect * from table1 where veld1 not in (select * from table2)i get : A Now i would like to do the same but via join commandsIs this possible?thx in advance |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2010-07-08 : 07:59:16
|
| SELECT <fieldList>FROM Table1 T1LEFT JOIN Table2 T2ON T2.veld1 = T1.veld1WHERE T2.veld1 IS NULL |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-08 : 08:01:48
|
| select t1.* from table1 as t1 left join table2 as t2 on t1.veld1=t2.veld1where t2.veld1 is nullMadhivananFailing to plan is Planning to fail |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-08 : 08:02:31
|
MadhivananFailing to plan is Planning to fail |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-08 : 08:02:43
|
| select * from table1 t1 left join table2 t2 on t1.veld1=t2.veld2where t2.veld1 is nullLimitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-08 : 08:03:15
|
Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
dendeze
Starting Member
2 Posts |
Posted - 2010-07-08 : 08:17:09
|
| thx for the replies, they are all correct.and so quickme like this forum :D |
 |
|
|
|
|
|