Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL syntax, IS TABLE OF and .extend
Do you know how to use IS TABLE OF and .EXTEND in PL/SQL functions?
I can define a TYPE with a PL/SQL table, but I have not yet found the proper syntax to .EXTEND it in a procedure.
I tried all three forms from the PL/SQL reference manual but all are rejected with this syntax error.
PLS-00306: wrong number or types of arguments in call to 'EXTEND'
How should I fix my code?
Thank you,
Volker
TYPE sequence_id_list IS TABLE OF NUMBER index BY binary_integer; FUNCTION my_func( i_count IN POSITIVEN) RETURN sequence_id_list;END with_syntax_error;
-- -- create or replace package BODY with_syntax_error as FUNCTION my_func( i_count IN POSITIVEN ) RETURN sequence_id_list as ret sequence_id_list ; beginReceived on Thu Oct 24 2002 - 04:10:33 CDT
/* case 1 */
ret.extend(i_count);
/* case 2 */
ret.extend;
/* case 3 */
ret.extend(i_count,0); /* do something with ret -- not shown here */ return ret; end; END with_syntax_error; / show errors ----------------------------- END EXAMPLE compiling them in sqlplus returns: Warning: Package Body created with compilation errors. SQL> Errors for PACKAGE BODY WITH_SYNTAX_ERROR: LINE/COL ERROR -------- ----------------------------------------------------------------- 8/4 PLS-00306: wrong number or types of arguments in call to 'EXTEND' 8/4 PL/SQL: Statement ignored 10/4 PLS-00306: wrong number or types of arguments in call to 'EXTEND' 10/4 PL/SQL: Statement ignored 12/4 PLS-00306: wrong number or types of arguments in call to 'EXTEND' 12/4 PL/SQL: Statement ignored SQL> -- Volker Apelt