XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Ray WaldronSubject: xpath query in SQL server
Author: Ray Waldron
Date: 04 Apr 2007 07:59 AM
Hi all,
Can someone please help.

I am trying to export a table in SQL 2000 to XML.
From My readings. I need to create an XML Schema that will be used to define the finished XML from the Table.
I have used Stylus Studio to create an XML from the table and then an XML Schema from the XML..
My question is...
I now have a table in SQL 2000 and an XML schema to create an XML but how do I run this in SQL 2000 and then schedule it to run every day.
I think I need to Use xpath query that creates the xml but I don't know where to start this. Can you please help.
Or is this all to be done using Stylus Studio and linked to SQL DB
Ray..

Postnext
Ivan PedruzziSubject: xpath query in SQL server
Author: Ivan Pedruzzi
Date: 04 Apr 2007 10:19 AM

Hi Ray,

If you are running Stylus Studio 2007 Enterprise, you can just use DataDirect XQuery, no need of mapping of any sort.

Please have a look to the video tutorial
http://www.stylusstudio.com/videos/ddxqdemo/datadirectxquery.html

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Ray WaldronSubject: xpath query in SQL server
Author: Ray Waldron
Date: 04 Apr 2007 11:43 AM
Hiya Thx for the reply..
I have viewed the tutorial..Very good..
However I think this may be overkill..

Jus a couple of quick questions.
How do I quickly use the xquery to create an xml from all columns in the linked SQL table?
How do I schedule this to run evry say 1 Hour?
and where does the xml get saved ?

Thx in advance.
Ray

Posttop
Alberto MassariSubject: xpath query in SQL server
Author: Alberto Massari
Date: 05 Apr 2007 04:04 AM
Hi Ray,
in order to simply get the data, just drag the table into the XQuery editor, and pick the collection('xxx') choice; running this query will get you a dump of the data in the default format.
If you need to run this with a schedule, you can enter the target file name in the Output URL setting of the scenario, choose the DDXQ processor and then generate a Java class to run the XQuery. At that point you can compile it and set up the task scheduler/cron to run it with the required frequency.
Be advised that this could require additional runtime licenses for either DDXQ and/or Stylus runtime components; if you don't need the performance and scalability provided by DDXQ or the flexibility of having a Java code that can be deployed on different platform (including web services/application servers) you can try using the free command line tool StylusXql to run the original XQuery.

Hope this helps,
Alberto

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.