Hi,
Hope you can help with the following.
I have been asked to create a xquery script that can be used to parse Oracle SQL statements into an XML structure and I would like some pointers on how best to achieve this. Please find below details:
1) The input SQL document is free format text where statements are split by ";" and may be entered over several lines. Example below:
"Create table x
(
Column1 varchar2(10),
Column1 varchar2(10)
);
Comment on column x.column1 "xxxxxxxxxxxxxx";
Alter table x add
("column3" varchar2(10));"
2) The XML output for the above example would be something like:
<sql command="create table" name="x">Create table x (Column1 varchar2(10),Column1 varchar2(10));</sql>
<sql command="comment on" name="column x.column1">Comment on column x.column1 "xxxxxxxxxxxxxx"; </sql>
<sql command="alter table" name="x">Alter table x add ("column3" varchar2(10)); </sql>
If you could provide some pointers on how best to achieve this result I would be much appreciated.
Best regards.
Mike
Michael Hancock
Clinical Applications Systems Programmer
Pharm-Olam International
The Brackens, London Road, Ascot
Berkshire, SL5 8BJ, UK
Tel: +44 (0)1344 898 583
Fax: +44 (0)1344 899 199
Email: Michael.Hancock(a)pharm-olam.com
This e-mail may contain information that is privileged, confidential and/or subject to legal restrictions and penalties regarding it's unauthorized disclosure or use. Unauthorized viewing, copying, distribution, disclosure or other use of this information is prohibited if you are not the intended recipient. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete this e-mail and attachments from your system. Thank you.