Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to execute dynamic if statement...

Preethi MallikarjunFeb 18 2010 — edited Feb 18 2010
Hi All,


My PL/SQL Blocks looks like this

declare
i_string :='if 3>20 then 1 else 2 end if;' varchar2(100);
begin



end;



Between begin and end i want a piece of code which executes that if statement and sends 2 as output in dbms_output.put_line since 3 is not >20 .Basically i want to know how to execute dynamic if statement.Please help

Thanks,
Preethi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2010
Added on Feb 18 2010
4 comments
1,770 views