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 ?
You don't need an objects type. Simply define a REF CURSOR and open it with the appropriate select. See:
https://oracle-base.com/articles/8i/ ... rdsets.php
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: https://oracle-base.com
My blog: https://oracle-base.com/blog
Who is online
Users browsing this forum: No registered users and 1 guest