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 -> Confusion with for loop

Confusion with for loop

From: Marc Eggenberger <marc.eggenberger_at_itc.alstom.com>
Date: Thu, 9 Oct 2003 10:35:26 +0200
Message-ID: <MPG.19ef3c38a98ff5719896d5@iww.cacti.ch.alstom.com>


Hi there.

I tried to use an FOR LOOP in an anonymous block (in the SQL Window in TOAD to be more specific).

I tried this:

DECLARE

	   CURSOR username_cur IS
	   	   SELECT Username FROM omsmaeg.eins;

BEGIN
	 FOR Username_rec IN Username_cur
	 LOOP
		 UPDATE USER_DEF SET Dvol = 'BI-DFS01\DFS' WHERE Username
		 = Username_rec.Username		 
	 END LOOP;
	 COMMIT;

END; I used this in procedures already. But now it says me I need to declare Username_rec. Isnt this the work of the FOR LOOP to do it implicit?

What am I doing wrong here?

-- 
mfg
Marc Eggenberger
Received on Thu Oct 09 2003 - 03:35:26 CDT

Original text of this message

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