Reputation: 153
One column of my query output contains char 13 ( new line character). To replace it with nothing I am trying to use below function but it is giving me below error ORA-00936: missing expression
select
replace(AUDITOR_COMMENTS,char(13),'')
from csa_sli_all.T_CONV_QUOTE
When I put char(13) in quote 'char(13)' error goes but it will not do as desired. I think I cannot include char(13) in quotes . I am using Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
Upvotes: 1
Views: 3967
Reputation: 9581
replace(your_data, chr(13), '')
try this as @sebastian said
select
replace(AUDITOR_COMMENTS,chr(13),'')
from csa_sli_all.T_CONV_QUOTE
Upvotes: 1
Reputation: 3042
Try this :
REPLACE(col_name, CHR(13) + CHR(10), '')
or
REPLACE(REPLACE( col_name, CHR(10) ), CHR(13) )
Upvotes: 1
Reputation: 2507
The function isn't char it's chr try calling:
select
replace(AUDITOR_COMMENTS,chr(13),'')
from csa_sli_all.T_CONV_QUOTE
Upvotes: 6