ORA-31061: XDB error: special char to escaped char conversion failed

 
ORA-31061: XDB error: special char to escaped char conversion failed

while executing a procedure the following error thrown

exec BU_OFFER.GET_UTILIZATION_REPORT_DATA1('bbc_00205196','','ALL','',:rc)

ORA-31061: XDB error: special char to escaped char conversion failed.
ORA-06512: at "FMS_ADMIN.BU_OFFER", line 175
ORA-06512: at line 1



The query which is used for generating XML is 

SELECT 
A.ADDRESS   -- this field containing special characters 
FROM UTILIZATION_REPORT_DATA A,BU_CONNECTIONS B
WHERE  B.PHONE_NO(+)=A.FTTH_PHONE_NO
AND A.OLT_IP IN(SELECT DISTINCT OLT_IP FROM OLT_STAFF_MAPPING WHERE BBC_USERNAME = 'bbc_00205196');


changed the above query using REGEXP_REPLACE  function

SELECT 
REGEXP_REPLACE(A.ADDRESS, ''[^[:print:]]'', '''')  ADDRESS
FROM UTILIZATION_REPORT_DATA A,BU_CONNECTIONS B
WHERE  B.PHONE_NO(+)=A.FTTH_PHONE_NO
AND A.OLT_IP IN(SELECT DISTINCT OLT_IP FROM OLT_STAFF_MAPPING WHERE BBC_USERNAME = 'bbc_00205196');

This solved the issue.



Post a Comment

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post