Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL syntax, IS TABLE OF and .extend

PL/SQL syntax, IS TABLE OF and .extend

From: Volker Apelt <gq437x_at_yahoo.de>
Date: 24 Oct 2002 11:10:33 +0200
Message-ID: <lgu1jccid2.fsf@mu.biosolveit.local>

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

create or replace package with_syntax_error as
       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 ;
begin

/* 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
Received on Thu Oct 24 2002 - 04:10:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US