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!

Replace null in zeros

525948Aug 11 2006 — edited Aug 12 2006
Friends i need to replace 0 in the bonus is null,for that i write the block like this


na number(12,2);
begin
select sal/bonus into na from v;
exception
when zero_divide then
insert into v (bonus) select decode(bonus,0,null) from v;
commit;
when others then
rollback;
end;


But my out put is like this

BONUS
------ ---
12
15
0 --where is null
12
0 --where is null here



Thank q all
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 9 2006
Added on Aug 11 2006
8 comments
3,369 views