Link to home
Create AccountLog in
Avatar of Steve A
Steve AFlag for United States of America

asked on

Remove double-quotes and carriage-return, line-feeds out of column data

Write an update statement to remove double-quotes and carriage-return, line-feeds out of a columns data.

--I thought this would work to remove the carriage-returns, line feeds but get a
--ora-01722:invalid number error where the datatype for column1 is varchar2(50).
Update mytable
set column1 = replace(column1, chr(13) + chr(10), '')

--tried for removing the double-quotes and did not remove them.
Update mytable
set column1 = replace(column1, '"', '')

Using Oracle 11g

Thanks
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Steve A

ASKER

Thanks for the information
when I did the select dump statement it returns a 'Typ-1 Len=8: 48,48,48,48,50,54,53,10' value on the column
so it might be a smart quote or something else maybe..
Avatar of Steve A

ASKER

Thanks for the info
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

>>value on the column

That column only contained numbers and a linefeed.

I get:  0000265

My go to reference:
http://www.asciitable.com/