Hi,
When I try to update a table form a database:
EXECUTE(
UPDATE ##TB_HIST
SET KEY=(SELECT DISTINCT KEY FROM TB_DEMO WHERE KEY =P_KEY ),
ID=(SELECT ID FROM TB__DEMO WHERE KEY =P_KEY)
WHERE UPPER(TYPE_TX)='Disney'
) BY SQLSERVER;
I get the error :
ERROR: CLI execute error: Subquery returned more than 1 value” and that “This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression”.
Kindly advise.
Thanks!