how to handle no_data_found exception in dynamic sql
Hi,
I have to use a dynamic sql to get value of a column into a variable. But suppose the value of column is null then it gives no data found exception. How can i handle no data found exception in dynamic sql.
for instance
declare variable1 number;
execute immedate ' select column_name from table_name where condition ' into variable1;
dbms_output.put_line(to_char(variable1));
Thanks,
Yogesh