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!

using nvl2 and decode

KSSJul 15 2009 — edited Jul 15 2009
Hi Experts,
Here my requirement is if column values is null or zero it should pass zero if it is having any value it should pass value+concat a % symbol.

I tried some thing like this

select nvl2(year,concat(year,'%'),0) from sales

it is handling only null values,when i am trying with Decode i am getting ora 01722 error.


can any one help me.


Thanks
kss.
This post has been answered by SeánMacGC on Jul 15 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2009
Added on Jul 15 2009
3 comments
603 views