Skip to content
Advertisement

How to resolve the invalid number in orcale

enter image description here I am facing an issue with some data that start with a strange character before the number 5 how can I discover all of these characters and remove it

5,AX,AMEX,0,0,0,0,0,0,0,
DM,BSHB,0,0,0,0,0,0,0,MC,
BSHB,1,323.50,0,0,0,0,1,P1,
BSHB,81,7819.25,0,0,0,0,81,
VC,BSHB,5,212.95,0,0,0,0,5

what do you recommend to resolve this issue knowing that I get the data from a specific source so I can not change anything but I am trying to mask it in the view?

Advertisement

Answer

regexp_replace can always help to find or replace/remove any characters you want.

For example, if you want to delete all characters escept alphanumeric, space, comma and dot:

regexp_replace(t.str,'[^ ,.[:alnum:]]')

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement