Stored Prcedure

All posts relating to Oracle PL/SQL development.

Moderator: Tim...


Stored Prcedure

Postby Guest » Mon Nov 01, 2004 6:09 pm


I have to write stored procedure which returns resultset.I have two tables Student and StudentAttendance. In studentAttendance table weekwise ,each students data like actualattendedsession, absence and other details are stored.

To the stored procedure i would be passing input as No.ofweeks, recordstofetch and schoolid. Maximum no. of weeks will be 15.

I have declared object of TYPE with fields as studentId, Field1, Field2...Field15.(Field1 correspond to week1..)
My problem is how do i return For one studentId, for all weeks differentData.
How do I declare TYPE OBJEct ?


Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

RE:Stored Prcedure

Postby Tim... » Mon Nov 01, 2004 6:09 pm


You don't need an objects type. Simply define a REF CURSOR and open it with the appropriate select. See: ... rdsets.php


Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website:
My blog:

Return to “Oracle SQL and PL/SQL Development”

Who is online

Users browsing this forum: No registered users and 1 guest