• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

XML SQL

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!