Case not working for non numeric data
967088Oct 9 2012 — edited Oct 9 2012Hi 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.