Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!mmcatv.co.jp!news.moat.net!news.glorb.com!postnews.google.com!z34g2000cwc.googlegroups.com!not-for-mail
From: "Ed Prochak" <edprochak@gmail.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: PL/SQL doesn't seem to commit
Date: 4 Apr 2006 11:33:54 -0700
Organization: http://groups.google.com
Lines: 55
Message-ID: <1144175634.784377.143090@z34g2000cwc.googlegroups.com>
References: <1144168964.962907.30380@t31g2000cwb.googlegroups.com>
NNTP-Posting-Host: 70.231.97.194
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1144175640 11077 127.0.0.1 (4 Apr 2006 18:34:00 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 4 Apr 2006 18:34:00 +0000 (UTC)
In-Reply-To: <1144168964.962907.30380@t31g2000cwb.googlegroups.com>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 proxy01.ta.com:3128 (squid/2.5.STABLE10)
Complaints-To: groups-abuse@google.com
Injection-Info: z34g2000cwc.googlegroups.com; posting-host=70.231.97.194;
   posting-account=z8J2OwwAAABzrSXAjma7SXOGeLMZZ_s1
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:126398


tarbster@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

