Home » SQL & PL/SQL » SQL & PL/SQL » How to select into a table variable with a table function (ORACLE 10G ,VISTA)
How to select into a table variable with a table function [message #393084] |
Fri, 20 March 2009 05:09  |
lzfhope
Messages: 69 Registered: July 2006
|
Member |
|
|
HI,
i declared user type two like below:
TYPE_R IS OBJECT(
ID NUMBER,
Name varchar2(40)
);
TYPE_TR IS TABLE OF TYPE_R;
Then,i wrote script:
declare
r type_tr:=type_tr();
begin
select * bulk collect into r from table(func_getNames(1));
end;
But,i got a error:PL/SQL ORA_00947:NOT ENOUGH VALUE.
WHY?
HOW CAN I SELECT INTO "R" WITH THE TABLE FUNCTION.
FUNC_GETNames is a pipelined table function ,it return type type_tr.if run "select * from table(func_getNames(1))" ,oracle would not send any error,it does well!
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun May 18 10:19:38 CDT 2025
|