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
Jim ByrneSubject: SQL/XML Syntax within DB to XML
Author: Jim Byrne
Date: 03 Dec 2004 10:35 AM
I have a copy of Jonathan Robie's SQL/XML, XQuery, and Native XML Programming Languages but when trying to use specific elements, they simply do not exist or the fire errors within DB to XML's SQL/XML editor. For instance XMLRoot(), XMLForest, XMLComment I cannot get to execute. I can run subqueries so I'm thinking the tool is powerful enough, I'm just missing something. Any examples, assistance would be most appreciated.

Postnext
Ivan PedruzziSubject: SQL/XML Syntax within DB to XML
Author: Ivan Pedruzzi
Date: 03 Dec 2004 11:43 AM
Hi Jim

In the SELECT tab Stylus Studio supports strictly core SQL/XML extension

XMLFOREST
XMLAGG
XMLCONCAT
XMLATTRIBUTES
XMLELEMENT

The following example shows XMLFOREST against the SQLServer database "pubs"

SELECT
XMLELEMENT(name "row",
XMLFOREST(t.au_id,t.au_lname)
)
FROM pubs.dbo.authors t

Ivan
Hope this helps

Postnext
Jim ByrneSubject: SQL/XML Syntax within DB to XML
Author: Jim Byrne
Date: 03 Dec 2004 12:46 PM
Great! That's almost go me home. Here's the SQL/XML:

XMLELEMENT(name "COMMENT",
XMLCONCAT(XMLFOREST(c.NoteComment1,c.NoteComment2))
)

Here's the result:
<COMMENT>
<NoteComment1>01:57 PM (jbyrne)
JIM: Ms. Smith called back to say that Steve is better, he has less trouble, but still has a problems. They said that he could come here, but they were not given a directions. I explained the way here meant going through town and that I w</NoteComment1>
<NoteComment2>ould be happy to contact the authorities.</NoteComment2>
</COMMENT>

If only I could get just the notes concatenated together under the <Comment> tag without the additional <NoteComment1> and <NoteComment2> tags all would be right in the world.

I am simply trying to concat two or more fields of 255 characters together to build a comment with possible 3000 characters. DirectData's Sequelserver ver5.4 apparently does not like memo fields comming out of MS Access.

Thanks again.

Postnext
Ivan PedruzziSubject: SQL/XML Syntax within DB to XML
Author: Ivan Pedruzzi
Date: 03 Dec 2004 02:08 PM

Jim, try the following


SELECT
XMLELEMENT(name "row",
XMLELEMENT(name "COMMENT", XMLCONCAT(c.NoteComment1,c.NoteComment2))
)
)

Posttop
Jim ByrneSubject: SQL/XML Syntax within DB to XML
Author: Jim Byrne
Date: 03 Dec 2004 02:30 PM
Ivan,

That did it! Thanks much!

Do you happen to have a resource of choice for the syntax of SQL/XML of the "strict" variety suitalbe for use within Stylus Studio?

Thanks also for the quick responses. I think the application to this project is going to synch my purchase of SS6 but we would have been doing a find/replace and searching for another tool if not for the prompt replies. Me and my clients certainly appreciate it.

Jim

 
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.