| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Error return by a function
Hi,
I have a problem calling a function in a package PL/SQL which returns a table
My example is :
CREATE OR REPLACE PACKAGE PK_EXAMPLE AS
TYPE ListeTesttyp IS TABLE OF VARCHAR2(200) INDEX BY BINARY_INTEGER;
TAB_Test ListeTesttyp;
FUNCTION F_Search(pTexte IN VARCHAR2) RETURN ListeTesttyp;
END PK_EXAMPLE ;
CREATE OR REPLACE PACKAGE Body PK_EXAMPLE AS
FUNCTION F_Search(pTexte IN VARCHAR2) RETURN ListeTesttyp is
BEGIN
TAB_Test.Delete;
TAB_Test(0) := 'Toto';
TAB_Test(1) := 'Titi';
RETURN TAB_Test;
END PK_EXAMPLE ; When i want to calling the function in SQL Worksheet, like this :
Declare
type tableau is TABLE OF VARCHAR2(200) INDEX BY BINARY_INTEGER;
table1 tableau;
begin
table1:=PK_EXAMPLE .f_search('my search');
end;
It returns :
table1:=pk_searchtotem2.f_search('toto');
*
ORA-06550: line 5, column 9:
But if the function is not in the package, it seems to work well.... Any idea ????
Thanks
Azhdin
Configuration : Oracle 7.3.4 on WinNT 4.0
email : aboulahouat_at_algoba.com Received on Thu Jul 15 1999 - 08:03:39 CDT
![]() |
![]() |