Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Table as Result of stored Function
Help, can anybody point me in the right direction?
Can I write a SQL statement that calls a stored PL/SQL function that uses a PL/SQL table for its return parameter?
i.e:
TYPE PRICE_RecType IS RECORD (
price_type varchar2(10) := '', cost number(5,5) := 0); TYPE PRICE_TabTyp IS TABLE OF PRICE_RecType INDEX BY BINARY_INTEGER;
CREATE or REPLACE function GetPriceInfo(code in number(6)) RETURN
PRICE_TabType IS
PRICE_tab PRICE_TabTyp;
BEGIN
blah, blah, blah...
RETURN PRICE_tab;
END; then use it like
SELECT
a.code,
GetPriceInfo (a.code)
FROM
a_table a
such that it will return the columns
code, price_type and cost.
Received on Mon Sep 13 1999 - 04:56:50 CDT