I have a long SQL string which has lots of double quotes, which I have to escape before using. Is there an easy way of doing this, like reading the string from a properties file?
FOR E.G.:
SELECT
(SELECT EXTRACTVALUE(XMLTYPE(COL1), '//p:testRq/policy/testId', 'xmlns:me="wsdl.http://www.example.com/Test", xmlns:ns0="wsdl.http://www.example.com/Test", xmlns:p="http://www.example.com/Test", xmlns:s="http://www.w3.org/2003/05/soap-envelope", xmlns:xsd="http://www.w3.org/2001/XMLSchema", xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance", xmlns="http://www.example.com/Test"')
FROM TESTTABLE
WHERE TESTID =
(SELECT MIN(TESTID)
FROM TABLE2
WHERE COL1 = COL2
)
) "RESULT"
Ok, it was easy to resolve this. I just created a named-native-query in an orm xml file and used the sql string from there.