[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: "Paul O'Riordan" <Paul_O'Riordan@AVERYDENNISON.COM>
- Date: Wed, 24 Oct 2001 16:50:57 +0100
You gave the table in your select an alias of B so you should select
"B.qty_allocated".
"Batchelor, Mildred @ HFS" <MBATCHELOR@CKR.COM>@list.iex.net> on
24/10/2001 16:28:50
Please respond to sqr-users@list.iex.net
Sent by: "Discussion of SQR, Brio Technology's database
reporting language" <SQR-USERS@list.iex.net>
To: SQR-USERS@list.iex.net
cc:
Subject: SQL Problem - Trying to update a table with data from another
tab le
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
$RFC822.eml