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

Re: extracting records using a cursor within a cursor

From: <andrewst_at_onetel.com>
Date: 25 May 2005 05:26:44 -0700
Message-ID: <1117024004.148729.266330@g14g2000cwa.googlegroups.com>


swoop wrote:
> CURSOR tgbp_cur IS
>
> SELECT cmpy, supp, tran_entry_date, tran_sysref
> FROM tgbpaym
> WHERE v_cmpy <> v_py_cmpy
> AND v_supp <> v_py_supp
> AND v_entry_date <> v_py_tran_entry_date
> AND v_sysref <> v_py_tran_sysref;

This 2nd cursor of yours doesn't check that there is NO match in tgbpaym for those 4 values, it fins ALL the rows in tgbpaym that DO NOT match. So if tgbpaym has 10,000 rows and one of those rows matches, then the cursor will return the other 9,999 rows! Received on Wed May 25 2005 - 07:26:44 CDT

Original text of this message

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