Hi!
I need to make an update to a field and it's value must be equal to another field in another table. Thr sql begin's to execute but then it gives an error:
"Result of SELECT more than one row."
I think it's normal, that he return's more than one row but how can i get it done?
The sql statement:
UPDATE bibl/FGDVLD001 SET ESCRITORIO = (SELECT A0AREA
FROM bibl/APOL00 WHERE MOD=A0$RAM AND NAPO=A0NAPO AND MULTI='N'
) WHERE EXISTS (SELECT * FROM ACOGISD#E/APOL00 WHERE
MOD=A0$RAM AND NAPO=A0NAPO AND MULTI='N')
In the detail's of the message, it says:
For a subquery the IN, EXISTS, ANY or ALL predicates can be used to process more than one result row.
But, isn't what i'm doing?
I need to make an update to a field and it's value must be equal to another field in another table. Thr sql begin's to execute but then it gives an error:
"Result of SELECT more than one row."
I think it's normal, that he return's more than one row but how can i get it done?
The sql statement:
UPDATE bibl/FGDVLD001 SET ESCRITORIO = (SELECT A0AREA
FROM bibl/APOL00 WHERE MOD=A0$RAM AND NAPO=A0NAPO AND MULTI='N'
) WHERE EXISTS (SELECT * FROM ACOGISD#E/APOL00 WHERE
MOD=A0$RAM AND NAPO=A0NAPO AND MULTI='N')
In the detail's of the message, it says:
For a subquery the IN, EXISTS, ANY or ALL predicates can be used to process more than one result row.
But, isn't what i'm doing?