• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML SQL

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am using the "Microsoft SQL Server XML Technology Preview" with SQL Srv 7.0
I have an error with a template. Can somebody help me ?
Thanks
Manuel
The template :
<Contact xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<sql:query>
select 1 as Tag, NULL as Parent,
ftp.id_ftp as [FTP!1!id_f],
NULL as [L!2!id_f_l]
from ftp
union all
select 2, 1,
ftp.id_ftp,
ftp_logistique.id_ftp_l
from ftp,
ftp_logistique
where ftp.id_ftp_l = ftp_logistique.id_ftp_l
for xml explicit
</sql:query>
</Contact>
The XML returned by SQL server 7.0 :
<?xml version="1.0" encoding="UTF-8"?>
<Contact xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<FTP id_f="295"/>
<FTP id_f="3"/>
<FTP id_f="5"/>
.
.
.
<FTP id_f="75">
<L id_f_l="25"/>
<L id_f_l="26"/>
<L id_f_l="27"/>
<L id_f_l="28"/>
<L id_f_l="29"/
.
.
.
</FTP>
</Contact>
The server should return:
<?xml version="1.0" encoding="UTF-8"?>
<Contact xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<FTP id_f="295">
<L id_f_l="25"/>
</FTP>
<FTP id_f="3"/>
<L id_f_l="24"/>
</FTP>
<FTP id_f="5"/>
<L id_f_l="2"/>
</FTP>
.
.
.
</Contact>
 
See where your hand is? Not there. It's next to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic