Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Query Question

Re: Query Question

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 11 Mar 2005 19:17:44 +0100
Message-ID: <4231e088$0$17301$636a15ce@news.free.fr>

"mike" <hillmw_at_charter.net> a écrit dans le message de news:1110563007.190233.249590_at_g14g2000cwa.googlegroups.com...
| So, you are suggesting I create a sql loop. The example they gave was:
|
| DECLARE
| CURSOR dept_cur IS
| SELECT deptno
| FROM dept
| ORDER BY deptno;
| -- Employee cursor all employees for a dept number
| CURSOR emp_cur (v_dept_no DEPT.DEPTNO%TYPE) IS
| SELECT ename
| FROM emp
| WHERE deptno = v_dept_no;
| BEGIN
| FOR dept_rec IN dept_cur LOOP
| dbms_output.put_line('Employees in Department
| '||TO_CHAR(dept_rec.deptno));
| FOR emp_rec in emp_cur(dept_rec.deptno) LOOP
| dbms_output.put_line('...Employee is '||emp_rec.ename);
| END LOOP;
| END LOOP;
| END;
|

http://www.google.fr/groups?selm=7r006n%24nko%241%40oceanite.cybercable.fr&output=gplain

Regards
Michel Cadot Received on Fri Mar 11 2005 - 12:17:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US