Oracle XMLSerialize throws "Expected ')'" error. What's the best substitute to get around it? #6704
Unanswered
mpersonable
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using sqlglot to try and grab columns from several Oracle SQL files. Unfortunately in many of them, XMLSerialize keeps causing "Expected ')'" errors, preventing me from reading columns. Most of the XMLSerialize sections are dozens to hundreds of lines long, but I found a shorter example snippet that throws the error:
select XMLSERIALIZE( DOCUMENT XMLELEMENT("FeatureCollection", XMLATTRIBUTES("http://localhost:2345/custom" as "xmlns:custom"), XMLAGG( XMLDOCS.XMLDOC ) ) ) as XMLDOC from ...
sqlglot throws an error right after "DOCUMENT". Trouble is the error doesn't always show up right after "DOCUMENT" for them, but they all throw the same "Expected ')'" error somewhere in their code blobs.
Since I really just need the columns, and XMLSerialize isn't exactly a column from a table, is there an appropriate XML object I could substitute it with to get what I need that wouldn't upset sqlglot?
Beta Was this translation helpful? Give feedback.
All reactions