|
next
|
Subject: Producing a treelike structure - How Now Brown Cow? Author: dee katz Date: 10 Jan 2006 06:28 PM
|
How can get a tree-like xml document structure (see attachment) from a SELECT statement that looks like this:
SELECT
XMLELEMENT( NAME "client",
XMLATTRIBUTES(t.record_id, t.system_id, t.odbid, t.date_added, t.date_updated),
XMLELEMENT( NAME "first_name", t.first_name),
XMLELEMENT( NAME "last_name", t.last_name),
XMLELEMENT( NAME "mi_initial", t.mi_initial),
XMLELEMENT( NAME "soc_sec_no", t.soc_sec_no),
XMLELEMENT( NAME "dynamic_content",
XMLELEMENT( NAME "svpprofgender", XMLATTRIBUTES(t.date_added, t.date_effective), t.svpprofgender),
XMLELEMENT( NAME "svpprofdob", XMLATTRIBUTES(t.date_added, t.date_effective), t.svpprofdob),
XMLELEMENT( NAME "svpprofrace", XMLATTRIBUTES(t.date_added, t.date_effective), t.svpprofrace)))
FROM ServicePoint.DBO.tblrawclients t
WHERE clientndx BETWEEN 1 and 12000
Is there a way that I can include the <records></records> information on the select statement itself. So far I've been running the query and copy and pasting the result to a template with <?xml version="1.0"?><records></records> already filled in (i.e. I pasted my data between the 2 records tags. There has to be an easier way of doing this instead of copying and pasting. Please help. I have to create 160 xml doc files base on this query. I am using SS6 Professional Edition. Thanks. TestClient.xml Sample XML document
|
|
|
|