Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: extracting records using a cursor within a cursor (again)
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