Can't figure out the correct syntax. for passing output array. Most of the examples I've found use 'packages' which are not viable in this application which specifically needs a straight stored procedure.that also does NOT make use of a cursor as output.
Receive following compilation error.
Line: 3 Column: 26 Error: PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier>
The symbol "<an identifier> was inserted before "TABLE" to continue.
create or replace
( O_RETURN OUT Varchar2.TABLE%TYPE)
TYPE MyArray is TABLE of Varchar2(80) Index by BINARY_INTEGER;
CRLF1 CONSTANT CHAR(2) := CHR(13)||CHR(10);
p_Count int :=1 ;
open p_Records FOR
SELECT distinct SA_DATACUSTODIAN
order by SA_DATACUSTODIAN;
fetch p_Records into p_OneName;
exit when p_Records%notfound;
p_Array(p_Count) := p_OneName;
p_Count := p_Count + 1;
p_Values := p_Values || p_OneName || CRLF1;
-- p_Values := p_Values || p_OneName || ',' ;