Re: BIG PROBLEM: pl/sql cursor blocks resulting in scrambeled data ??? [HELP]

From: Neil Greene <neil_at_kynug.org>
Date: Fri, 8 Apr 1994 19:11:34 GMT
Message-ID: <1994Apr8.191134.7036_at_KYnug.org>


In article <1994Apr8.162828.5617_at_KYnug.org> Neil Greene <neil_at_kynug.org> writes:
> System Details:
>
> NeXTCube - NEXTSTEP 3.2
> ORACLE RDBMS V6.0.30.3.1
> SQL*Plus: Version 3.0.8.1.1
> PL/SQL V1.0.30.1.1
[ CRY FOR HELP DELETED ] I have resulted to deleting my origional procedure down to the basics and I still get wrong values. Look at this procedure that does nothing except insert the same value into two different fields in a table:

> DECLARE
> CURSOR c1 IS
> SELECT FNAME, LNAME
> FROM BI_LICENSES;
>
> c1_RECORD c1%ROWTYPE;
>
> BEGIN
> OPEN c1;
> LOOP
> FETCH c1 INTO c1_RECORD;
> EXIT WHEN c1%NOTFOUND;
>
> INSERT INTO TMP_NAMEVALUES VALUES (
> c1_RECORD.LNAME, c1_RECORD.LNAME,
> null, null, null, null, null, null);
>
> END LOOP;
> COMMIT;
> CLOSE c1;
> END;
> .
> /

Here is the table tmp_namevalues:

> SQL> describe tmp_namevalues
> Name Null? Type
> ------------------------------- -------- ----
> SOURCE_FNAME CHAR(20)
> DEST_FNAME CHAR(20)
> SOURCE_MNAME CHAR(20)
> DEST_MNAME CHAR(20)
> SOURCE_LNAME CHAR(20)
> DEST_LNAME CHAR(20)
> SOURCE_SSN CHAR(9)
> DEST_SSN CHAR(9)
Based on the insert statement above, I should have the same values for SOURCE_FNAME and DEST_FNAME. But, this is not the case. Look at the result where some are not equal:

> SOURCE_FNAME DEST_FNAME
> ------------ ---------
> RICHARDSON ARDSONDSON
> PHILLIPS LIPSLIPS
> MITCHELL HELLHELL
> SWANSON SONNSON
> ATMORE REMORE
> DORION ONRION
Scrambeled again!!!!!

-- 
Neil Greene
benchMark Developments, Inc. [NeXT VAR]
2040 Regency Road, Suite C Lexington, KY 40503
Phone: 606-231-6599 / Fax: 606-254-4864
Received on Fri Apr 08 1994 - 21:11:34 CEST

Original text of this message