I am trying to insert some XML data into a blob column using utl_raw.cas_to_raw.
But my XML contains a single quote (as part of a query), which prevents me from inserting the row to XML.
The query is like this:
INSERT INTO ABCD
VALUES (utl_raw.cast_to_raw('<?xml version="1.0" encoding="UTF-8"?><resource name="ID" ><value Type="multiple" query="select role_no, name from mytable where name='A'"/></resource>'),'C2','C3');
The part- name=’A’ is causing issue. Please help me with this.
Thank you
You can escape quotes (
') with 2 single quotes ('') or backslash quote (\')