How do I get a return value from calling a stored procedure using Oracle sql? I have a stored procedure named "GET_AUDIT_FLAG",
and I want to call it from within another stored procedure. Can soneone show me the Syntax I would need at line 1 in order to get the
return value from my stored procedure "GET_AUDIT_FLAG"? I know my syntax at line 1 is incorrect. Please take into consideration that
I have an IN OUT parameter in the stored procedure GET_AUDIT_FLAG : pocoTableAudited IN OUT CHAR
-- Sql within calling stored procedure.
1. returnValue := EXECUTE IMMEDIATE GET_AUDIT_FLAG 'Customer'
-- Stored procedure which I want to call
CREATE OR REPLACE
inTableName IN VARCHAR := NULL,
pocoTableAudited IN OUT CHAR
lnAuditInd := 0;
lvcSqlString := 'SELECT AD_FLAG FROM ' || 'AD_TABLE' || ' WHERE TBTB_NAME = ' || '''' || inTableName || ''''
EXECUTE IMMEDIATE lvcSqlString INTO lnAuditInd;
IF lnAuditInd = 1 THEN
pocoTableAudited := 'Y';
pocoTableAudited := 'N';