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 |
|
Vack
Aged Yak Warrior
530 Posts |
Posted - 2012-10-22 : 10:34:49
|
I have two identical tables. bmp1 bmp2bmp1item_no comp_item ABC XYZI want to select records that do not exist in bmp2 |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-10-22 : 11:07:19
|
| [code]SELECT * FROM bmp1EXCEPTSELECT * FROM bmp2;[/code] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-10-22 : 12:21:31
|
| [code]SELECT *FROM bmp1 b1WHERE NOT EXISTS (SELECT 1 FROM bmp2 WHERE comp_item = b1.item_no)[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|