Hi, I have created a query to update my table. I take the values to update it puting in join trhee tables. this join return to me 4 rows and the column to update are 4. It's possible to update my column with multi value (4 in this case)?
this is my query...
UPDATE DBFN01.CLIENT_BD_TOTAL AS TC
SET TC.PERCCOERNOTCOER =
SELECT (PERCENTAGE-T.PERCTOTASSETCLASS) PERCCOERNOTCOER
FROM DBFN01.CLIENT_BD_TOTAL T
LEFT OUTER JOIN(
SELECT * FROM DBFN01.CLIENT_BD_TOTAL T ,
WHERE RPF.PROFILEID=T.RISKPROFILEID AND RULEID=1
AND RPF.PTFID=P.PTFID AND T.ASSETCLASSID=P.ID) TEST
WHERE T.ACLEVEL =2 AND T.EXTERNALID = '001994275_REF'
As rahul told you cannot do that. By the way what do you mean by
"It's possible to update my column with multi value (4 in this case)?"
If the select query in the SET clause results more than one value DB2 would through you some negative error code. It should fetch one and only one value. You cannot use FETCH FIRST 1 ROW ONLY also. The conditions in the WHERE predicate should be qualified for one row only.