XQuery has no built-in capability to parse SQL or to execute the result after
parsing.
You could generate an XQuery parser for a subset of SQL using REx
(http://www.bottlecaps.de/rex/), which would give you an XML representation of
the SQL command, and you could then write an XSLT or XQuery pro
Hi Michael,
I agree with Mike, but would add that with XQuery's FLWOR expressions, window
clauses, builtin functions (tokenize, replace, match, etc) as well as EXPath
modules, you can achieve a lot on text input that is "not too unstructured". I
did it quite a few times. Some engines also have
Hi Michael (Sahm),
maybe you’ll need to additionally give us more information on your requirements:
> I want to transform a very simple SQL Create Table statement into XML.
Would you like to parse your SQL (or just DDL) expressions in XQuery
and execute them in a second step? Do you want to stor
Hi Mike and Ghislain,
> Of course, parsing a full language like SQL is best done using the typical
> approaches (lexer, grammar, etc) as Mike suggests, and is not trivial. But if
> the subset is really very simple (as simple as your example), known in
> advance, and if there are no irregulari
Hi Christian,
> Would you like to parse your SQL (or just DDL) expressions in XQuery
> and execute them in a second step? Do you want to store SQL data in an
> XML database in a leter step, or do you only want to create a schema
> representation of your SQL table definitions in XML, resulting fr
Dear Michael,
I got the query below to work on the sample that you gave us. It gives the
required input with Zorba and requires XQuery 3.0 (for the windows). It only
took a few minutes to write and can probably be improved, but this should give
you a starting point.
A word of caution: it shoul
Here.
https://www.ibm.com/developerworks/data/library/techarticle/dm-1006queriespurexml/index.html
On Thu, Aug 10, 2017 at 2:13 AM, Ihe Onwuka wrote:
> DB2 version 10 onwards lets you mix SQL and XQuery commands in one query.
>
> On Thu, Aug 10, 2017 at 2:07 AM, wrote:
>
>>
>> Hi,
>>
>> I kno