Subject | SQL question - update with a join |
---|---|
Author | wdillon24 |
Post date | 2008-02-12T23:04:22Z |
Hi All:
I have this SQL that I'm trying to update Qty on Order in the
Inventory table. I only want to update for certain vendor and that's
why I need the join.
Anyway, I get an error when I try to run this.
Thanks for any help
Bill
update INVENTORY
set INVENTORY.INV_QTYONORDER = 0
from INVENTORY
left outer join INVENTORY_SUPPLIER
on (INVENTORY.INV_ID = INVENTORY_SUPPLIER.INVSUP_INVID)
where INVENTORY.INV_QTYONORDER <> 0
and INVENTORY_SUPPLIER.INVSUP_SUPPNUM = 10
I have this SQL that I'm trying to update Qty on Order in the
Inventory table. I only want to update for certain vendor and that's
why I need the join.
Anyway, I get an error when I try to run this.
Thanks for any help
Bill
update INVENTORY
set INVENTORY.INV_QTYONORDER = 0
from INVENTORY
left outer join INVENTORY_SUPPLIER
on (INVENTORY.INV_ID = INVENTORY_SUPPLIER.INVSUP_INVID)
where INVENTORY.INV_QTYONORDER <> 0
and INVENTORY_SUPPLIER.INVSUP_SUPPNUM = 10