Link to home
Create AccountLog in
Avatar of anumoses
anumosesFlag for United States of America

asked on

oracle query - loop

Cursor C2 is
select distinct schedule_date from juggler_vw
where schedule_date between next_day(to_date('04-jun-2012','dd-mon-yyyy')-7, 'Sunday') and next_day(to_date('04-jun-2012','dd-mon-yyyy'), 'Saturday') ;

Open C2;
loop
Fetch C2 into v_sched_date1;
message('v sched date1='||v_sched_date1);pause;  
exit when C2%notfound;
End loop;
Close C2;

Instead of 7 records I am getting 8 records. The last one is displaying twice. 06/09/2012.
What is that I am missing
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of anumoses

ASKER

thanks