Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Cursor help?
Oracle newbie question. I have a cursor with a group by clause. I can not
get the column alias to print. It says "sections" need to be defined.
Also I want this to only run against the first ten rows in the instructor
table. I tried it this way and it doesn't work. Any dieas?
SET SERVEROUTPUT ON;
DECLARE
CURSOR c_instructor_info IS
SELECT first_name, last_name ,count(*) "sections" FROM instructor i INNER JOIN section s ON i.instructor_id = s.instructor_id WHERE rownum <= 10 GROUP BY first_name, last_name; rv_instructor c_instructor_info%ROWTYPE;BEGIN
END LOOP;
CLOSE c_instructor_info;
END;
/
Thanks for any help.
Cheers,
~ck
Received on Thu Nov 15 2007 - 13:43:13 CST
![]() |
![]() |