Home » SQL & PL/SQL » SQL & PL/SQL » table function in anather function
table function in anather function [message #190367] Wed, 30 August 2006 06:50 Go to next message
unikat
Messages: 2
Registered: August 2006
Junior Member
Hi

I'v got a problem:
I heve one function like this:
FUNCTION TEST1 (AA IN INTEGER)
RETURN TYPE_TABLE PIPELINED
AS
BEGIN
FOR REC IN (SELECT A, B, C FROM A_TABLE
WHERE D = AA)
LOOP
PIPE ROW(TYPE_ROW(REC.A, REC.B, REC.C));
END LOOP;
END;


And the seckend function like this:
FUNCTION TEST2 (BB IN INTEGER)
RETURN TYPE_TABLE2 PIPELINED
AS
BEGIN
FOR REC IN (SELECT A, B, C FROM TABLE(TEST1(BB))
LOOP
PIPE ROW(TYPE_ROW2(REC.A, REC.B, REC.C));
END LOOP;
END;

it does'nt work
please help

Re: table function in anather function [message #190383 is a reply to message #190367] Wed, 30 August 2006 07:39 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
And the error you get is?
Re: table function in anather function [message #190392 is a reply to message #190383] Wed, 30 August 2006 08:31 Go to previous messageGo to next message
unikat
Messages: 2
Registered: August 2006
Junior Member
An error is ORA-22905.

I'm sory I found answer for this question: http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2270447621346#2286449496348
Re: table function in anather function [message #190397 is a reply to message #190392] Wed, 30 August 2006 08:56 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Glad you found an answer.
Previous Topic: comparision
Next Topic: How to find the common values among groups of values
Goto Forum:
  


Current Time: Tue Dec 10 02:01:48 CST 2024