Hi Guys
I have created a Stored Procedure which do some string manipulation. Below is much simple version of actual string manipulation.
REPLACE PROCEDURE TST_PROC(IN VAL_TO_CHANGE VARCHAR(30), INOUT CHANGED_VAL VARCHAR(30)) BEGIN SEL UPPER(VAL_TO_CHANGE) INTO CHANGED_VAL; END;
And I can call the procedure
CALL TST_PROC('Testing Proc',CAST('' AS VARCHAR(30)))
However my requirement is ; instead of passing the static value, I want to pass a column in a table and whatever the output of Stored Procedure should come, the table column should be updated by that value.
Something like
CALL TST_PROC(LAST_NAME, CAST('' as VARCHAR(30)))
and the output of the stored procedure should be used to update the column LAST_NAME of the table CUSTOMER.
Something like
UPDATE CUSTOMER set LAST_NAME=CALL TST_PROC(LAST_NAME, CAST('' as VARCHAR(30))) /* output value should be updated in table */
I understand syntactically above statements are wrong. And my approach may be not right. However I tried to explain the requirement.
Any inputs will be helpful.
Thanks in advance.
Tags:
Forums: