| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Simple FOR loop
Using Oracle 9.0.1, this is what I want to do:
* Create a simple loop iterating over a set of date values
I'm using SQL Navigator for doing this, but it will be put in a stored
procedure onvce I figure this out.
I'm not really able to create this in an easy way, which I hoped. I hoped to
do it using a simple FOR loop, and avoid some cursor programming (since I'm
not really a PL/SQL programmer)
I've been trying something like this:
declare l_dateval date;
for l_dateval in (select distinct date_col from slv) loop
update slv
set slv.settledayhist = (select s.settleday from statement s where s.id
= slv.setl_id)
where slv.settleday = to_date('27.02.2003', 'DD.MM.RRRR')
and slv.settledayhist IS NULL;
end loop;
Any insights? Can it be done?
Thanks in advance
Knut
Received on Fri Apr 04 2003 - 15:23:05 CST
![]() |
![]() |