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

Re: PL/SQL doesn't seem to commit

From: Ed Prochak <edprochak_at_gmail.com>
Date: 4 Apr 2006 11:33:54 -0700
Message-ID: <1144175634.784377.143090@z34g2000cwc.googlegroups.com>

tarbster_at_yahoo.com wrote:
> 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

SORRY, but I fail to see an UPDATE statement in your posting.

So maybe you need to add an UPDATE line???

   hth,
 ed Received on Tue Apr 04 2006 - 13:33:54 CDT

Original text of this message

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