Impossible to do XMLQUERY for Oracle databases

I've been trying out DataGrip as a replacement for TOAD but have hit a rather large snag with the string wrapping in the code editor.

-- What I want
SELECT
XMLQUERY('
copy $temp := $data/*
modify (
replace value of node $temp/FOO with $foo
)
return $temp
'
PASSING
XMLELEMENT("ROOT",
XMLELEMENT("FOO", 10)
) AS "data",
12 AS "foo"
RETURNING CONTENT
)
FROM dual
-- What I get
SELECT
XMLQUERY('' ||
'copy $temp := $data/*' ||
'modify (' ||
'replace value of node $temp/FOO with $foo ' ||
')' ||
'return $temp'
PASSING
XMLELEMENT("ROOT",
XMLELEMENT("FOO", 10)
) AS "data",
12 AS "foo"
RETURNING CONTENT
)
FROM dual

The second errors because the XQuery is missing whitespace. Is there any way to disable this behavior?

 

0
1 comment
Avatar
Permanently deleted user
0

Please sign in to leave a comment.