We've a table with a varchar2(100)
column, that occasionally contains carriage-return & line-feeds. We should like to remove those characters in the SQL query. We're using:
REPLACE( col_name, CHR(10) )
which has no effect, however replacing 'CHR(10)' for a more conventional 'letter' character proves that the REPLACE function works otherwise. We have also found that
REPLACE( col_name, CHR(10), '_' )
finds the location of the new-line, but inserts the underscore after it, rather than replacing it.
Running on Oracle8i. Upgrading is not an option.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…