Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-64451: Conversion of special character to escaped character failed

I am concatenating some texts and I get this weird error that I can't find anything about

UPDATE Table1 a
SET a.AllTexts = a.Text
  || a.Title
  ||
  (SELECT XMLAGG(XMLELEMENT(E,"Text",',').EXTRACT('//text()')).GetClobVal()
  FROM Table2 b
  WHERE b.El_Id = a.Id
  )

AllTexts is CLOB, all other columns are VARCHAR2

I get

Error report -
SQL Error: ORA-64451: Conversion of special character to escaped character failed.
64451. 00000 -  "Conversion of special character to escaped character failed."
*Document: NO
*Cause:    An attempt to convert a special character to an escaped character failed.
*Action:   Remove the special character that cannot be escaped.

Edit: the error is caused by some weird symbols. Problem is there is no way to know ahead which symbols will block execution

like image 351
Toolkit Avatar asked Jan 19 '17 19:01

Toolkit


1 Answers

I got this error code and this work for me

REGEXP_REPLACE(COLUMN, '[^[:print:]]', '') 
like image 139
BadLeo Avatar answered Oct 14 '22 09:10

BadLeo