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 |
bilencekic
Posting Yak Master
121 Posts |
Posted - 2006-10-27 : 08:14:10
|
i have 2 tablesi want records that which doesnt exists on 2nd table.the have a same column named Wordi tried not exists but coudlnt make it.select * from firsttable where not exists(Select Word from secondtable)MS BLESS US |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-10-27 : 08:27:16
|
[code]select * from firsttable f where not exists(Select Word from secondtable s where s.Word = f.Word)[/code] KH |
|
|
iminore
Posting Yak Master
141 Posts |
Posted - 2006-10-27 : 08:30:12
|
Read about 'joins-SQL Server' in BOL. You need a left join with a null value from the second table. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-27 : 08:44:38
|
Or use NOT IN keyword.Peter LarssonHelsingborg, Sweden |
|
|
bilencekic
Posting Yak Master
121 Posts |
Posted - 2006-10-27 : 08:55:34
|
thx =)MS BLESS US |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
bilencekic
Posting Yak Master
121 Posts |
Posted - 2006-10-27 : 09:43:58
|
lolsometimesi forgot basic commands =)i know very well (i think)MS BLESS US |
|
|
|
|
|