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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Case not working for non numeric data

967088Oct 9 2012 — edited Oct 9 2012
Hi All,

I want to check for a column value, if its non numeric then i should retrieve data as it is else i should check for other conditions.

My query is:

select bitrate,case
when bitrate >=1000000 then bitrate/1000000||'G'
when bitrate >=1000 and bitrate <=1000000 then bitrate/1000||'M'
when REGEXP_LIKE(bitrate, '[^a-zA-Z]', '') then bitrate
else
bitrate||'K'
end speed_decoded from circuit

But when i scroll down, I get invalid number error. I guess I am getting this error at character data.
Please help how can i check for non numeric data in case and retrive it.

ORA-01722: invalid number

Please do the needful.

Thanks in advance,
Preeti.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2012
Added on Oct 9 2012
16 comments
610 views