Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

for loop

hemant_kMay 17 2024 — edited May 17 2024

hi

i am trying folllowing

begin 
for x in (
select to_date('31-mar-2023','dd-mon-yyyy')+level from dual
connect by level<=to_date('31-mar-2024','dd-mon-yyyy')-to_date('31-mar-2023','dd-mon-yyyy')
)
loop
select tran_date_bal from tbaadm.eab where 
to_date('31-mar-2023','dd-mon-yyyy')+level between eod_date and end_eod_date
and acid='AA252409';
dbms_output.put_line( tran_date_bal);
end loop;
end;

can this be done ?

Actually I am trying to deisplay the balanace for each day for a given id

if it can be done with any other way please suggest

Please help

I am on 12 c

Comments
Post Details
Added on May 17 2024
6 comments
182 views