[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQL Problem - Trying to update a table with data from another tab le
- Subject: Re: SQL Problem - Trying to update a table with data from another tab le
- From: "Batchelor, Mildred @ HFS" <MBATCHELOR@CKR.COM>
- Date: Wed, 24 Oct 2001 09:26:10 -0700
Thanks all:
I have it working. This is what I did as follows:
Update PS_BU_ITEMS_INV
set PS_BU_ITEMS_INV .QTY_RESERVED = (SELECT qty_allocated
FROM
c_ps_sum1_demandin B
WHERE
PS_BU_ITEMS_INV.BUSINESS_UNIT = B.BUSINESS_UNIT
and
PS_BU_ITEMS_INV.INV_ITEM_ID = B.INV_ITEM_ID)
WHERE EXISTS (SELECT 'X' FROM c_ps_sum1_demandin C
WHERE
PS_BU_ITEMS_INV.BUSINESS_UNIT = C.BUSINESS_UNIT
and
PS_BU_ITEMS_INV.INV_ITEM_ID = C.INV_ITEM_ID);
Mildred Batchelor
mbatchelor@ckr.com