[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



-----Original Message-----
From: Batchelor, Mildred @ HFS [mailto:MBATCHELOR@CKR.COM]
Sent: Wednesday, October 24, 2001 8:29 AM
To: SQR-USERS@list.iex.net
Subject: SQL Problem - Trying to update a table with data from another
tab le
Hi Mildred,

Check the spacing in your statement,  PS_BU_ITEMS_INV.QTY_RESERVED

 set  PS_BU_ITEMS_INV .QTY_RESERVED =  (SELECT
c_ps_sum1_demandin.qty_allocated



I am trying to update a table with data that I have created in another
table
with no success.  I am getting an error message that table has not been
selected (the table that I am trying to pull from).  Here is the script.
Can someone please tell me what I am doing wrong?

Update PS_BU_ITEMS_INV

  set  PS_BU_ITEMS_INV .QTY_RESERVED =  (SELECT
c_ps_sum1_demandin.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);

Thanks
Mildred Batchelor
mbatchelor@ckr.com