I am new to this group. I was trying to think of having a cursor with condition select statement. Some how like this pseudo code--
[B]cursor test_cursor is
if condition == 't11'
then
select * from test1;
else
select * from test1;
end if;[/B]
begin
for cursorVal in test_cursor loop
//Doing the actual task on cursor data.
end loop;
commit;
end;
Actually, i came across with a scenario where need to work on two different tables with same DDL. Based on some user input, need to fetch data from either of the table and further manipulate in procedure. As i said both table are of same DDL so don't want to create two different cursor. The reason for this same business logic will be applied on both tables data. Its just the user input which decide which table need to fetch data. Some how one can think of this as latest data and historical data and the way DB is designed.
Hope i am clear with my scenario.
Thanks, Arfeen.