Skip to content

Instantly share code, notes, and snippets.

Created April 25, 2013 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5456745 to your computer and use it in GitHub Desktop.
Save anonymous/5456745 to your computer and use it in GitHub Desktop.
tab has 1 xml column
rough code - but real code works and has this same format
insert into tab
with cte as
(select *
from xmltable(.... passing xmlparse(document cast(? as clob)) as ... <====== parameter has very long xml I need to split
columns
c1 xml path ...
c2 xml path ...
)
)
(select xmldocument(xmlelement(name ... xmlelement(name "xx", c1) ...
from cte
fetch first 1 row only
)
union all
(select xmldocument(c2)
from cte
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment