| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL : Probleme with not existence of result in temporary table
PL/SQL : Probleme with not existence of result in temporary table
Hi, i have a problem with this request :
update
TABLE_U
set field_u = (
select PV.res
from
TABLE_1
,
(
SELECT
CI4.cd_mkp,
SUM(CI4.mt_pvp) res
FROM
INTRA_IFT_CAT CI4
WHERE
CI4.ind_netting = 0
GROUP BY
CI4.cd_mkp,
) TABLE_2
where
TABLE_1.val = TABLE_U.val
AND TABLE_2.cd_mkp = TABLE_U.cd_mkp
)
where
TABLE_1.val = TABLE_U.val
AND TABLE_2.cd_mkp = TABLE_U.cd_mkp
With this, i want this result :
When 'res' exists, the field must be update whith PV.res. When 'res' doesn't exist (the request that generate TABLE_2 give no line), the field 'fild_u' must not be changed.
In fact the resut is :
When 'res' exists, the field must be update whith PV.res.
When 'res' doesn't exist, the field 'fild_u' IS UPDATED BY NULL.
Is anybody can help me ?
Thanks
PG
Received on Fri Mar 07 2003 - 17:34:55 CST
![]() |
![]() |