Home » SQL & PL/SQL » SQL & PL/SQL » function returning array
function returning array [message #188278] Thu, 17 August 2006 14:46 Go to next message
Messages: 12
Registered: May 2006
Junior Member
I was just wondering if following scenario is possible in a stored procedure.
I have a package, which includes 4 different functions and 1 procedure. Procdure uses ref cursor to return values in my reporting tool. What I am trying to do is to write a function which takes input and return array of varchar. Something like..

Package ABC
Function student_classes (student_no in Varchar2) return [array]
select class_nbr into [array]
from student_table
where student_nbr = student_no;
return [array];
end student_classes;

procedure students_info (rpt_cursor IN OUT rpt_type)
OPEN rpt_cursor FOR
student_classes (student_nbr) --returns array
from student_table;
end student_info; --end of procedure

end abc; --end of pacakge.

I used [array], as I am ont sure how to define (syntax) it in spec part of package or in body. I will really appreciate if someone could help me with this function.

Thank you
Re: function returning array [message #190177 is a reply to message #188278] Tue, 29 August 2006 10:03 Go to previous message
Messages: 50
Registered: November 2004
Location: New Delhi


Can a Student study in multiple class ?.
or you want to know how to use varray ?

This is Happening from your "where clause"
Previous Topic: How to store files from clob column to local path
Next Topic: DataPump Network Import PL/SQL
Goto Forum:

Current Time: Fri Jul 21 00:08:43 CDT 2017

Total time taken to generate the page: 0.17913 seconds