anumoses
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-2 012','dd-m on-yyyy')- 7, 'Sunday') and next_day(to_date('04-jun-2 012','dd-m on-yyyy'), 'Saturday') ;
Open C2;
loop
Fetch C2 into v_sched_date1;
message('v sched date1='||v_sched_date1);pa use;
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
select distinct schedule_date from juggler_vw
where schedule_date between next_day(to_date('04-jun-2
Open C2;
loop
Fetch C2 into v_sched_date1;
message('v sched date1='||v_sched_date1);pa
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER