Hi PAVB,
Thank you for your reply.
I tried the code which you have sent

But giving the following error
Code:
 
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 6
What would be the reason.