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: extracting records using a cursor within a cursor (again)

Re: extracting records using a cursor within a cursor (again)

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 31 May 2005 07:47:29 -0700
Message-ID: <1117550719.710987@yasure>


swoop wrote:
> Hi folks, me again.
>
> I have taken on board what everyone suggested in my post last week and
> I really appreciate it.
>
> However, and there is always a however - I have been told by my
> colleague requesting this to use 2 cursors.

Why?

There is no possible justification in the PL/SQL you posted for one cursor much less two much less any loops whatsoever. What you posted equals one DML statement.

BEGIN
   INSERT INTO utgbtran
   (column_name_list)
   SELECT (column_name_list)
   FROM tgbtran t, tgbpaym p
   WHERE ....; But even if this is incomplete it is still not an appropriate use of cursors unless you are using a neolithic version of Oracle.

I'd like to suggest that if your colleague thinks this makes any sense that he/she join us here and explain their thinking. My personal evaluation is that they need to take a basic PL/SQL course not grounded in Oracle version 7.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Tue May 31 2005 - 09:47:29 CDT

Original text of this message

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