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 -> PL/SQL doesn't seem to commit

PL/SQL doesn't seem to commit

From: <tarbster_at_yahoo.com>
Date: 4 Apr 2006 09:42:45 -0700
Message-ID: <1144168964.962907.30380@t31g2000cwb.googlegroups.com>


Hi all,

I'd really appreciate some help with a PL/SQL problem in 9i. This routine compiles fine, and seems to update the column as intended (the DBMS_OUTPUT command shows me a UID for each row), but after the commit I find that the column is blank (which is what it was before the routine ran).

SET PAGESIZE 50
SET SERVEROUTPUT ON SIZE 1000000 DECLARE
LV_GUID VARCHAR2(54);
CURSOR HARNLOC1_CURSOR IS SELECT HARNLOC1_ID FROM HARNLOC1; HL1_ROW HARNLOC1_CURSOR%ROWTYPE; BEGIN   OPEN HARNLOC1_CURSOR;   LOOP     FETCH HARNLOC1_CURSOR INTO HL1_ROW;
    EXIT WHEN HARNLOC1_CURSOR%NOTFOUND;
    SELECT SYS_GUID INTO LV_GUID FROM DUAL;     HL1_ROW.HARNLOC1_ID := 'UID' || SUBSTR(LV_GUID,1,6) || '-' || SUBSTR(LV_GUID,7,11)|| '-' || SUBSTR(LV_GUID,18) ||

'00000000000000000';

    DBMS_OUTPUT.PUT_LINE(HL1_ROW.HARNLOC1_ID);   END LOOP;   CLOSE HARNLOC1_CURSOR; END;
/

COMMIT; What change do I need to make to the code to make the update permanent?

TIA
Tarby Received on Tue Apr 04 2006 - 11:42:45 CDT

Original text of this message

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