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 |
|
sky
Starting Member
10 Posts |
Posted - 2002-02-11 : 05:16:10
|
This one sould be easy? How do I delete the rows selected from table B in the following query.SELECT tableA.ProductId, tableB.fullProductId, FROM tableA RIGHT OUTER JOIN tableB ON tableA.ProductId = tableB.fullProductIdWHERE (tableA.ProductId IS NULL)--------------------------------If your swimming upstream, your going the wrong way. |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-02-11 : 06:44:27
|
HiStart with table B and left join the table A onto it.DELETE FROM tableBFROM tableBLEFT JOIN tableA ON tableA.productID = tableB.fullProductIDWHERE tableA.ProductID is NULL Note the extra FROM clause.Hope that helpsDamian |
 |
|
|
sky
Starting Member
10 Posts |
Posted - 2002-02-11 : 11:40:21
|
Thanks Merkin --------------------------------If your swimming upstream, your going the wrong way. |
 |
|
|
|
|
|