SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 xquery urgent
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

raghava
Starting Member

3 Posts

Posted - 03/02/2006 :  08:46:32  Show Profile
hi
I have an xml file like this....
<root>
<items>
<item>
<id>1</id>
<name>kkk</name>
<category>jjj</category>
</item>
<item>
<id>2</id>
<name>aaa</name>
<category>mmm</category>
</item>
<item>
<id>3</id>
<name>nnn</name>
<category>ooo</category>
</item>
</items>
</root>
I have written the xquery in sql server 2005 like this....
select transaction.query('for $x in //items/item return data($x/child::id)') from paymenttable
the result is like this....
1 2 3
but we need it as
1
2
3
any body pls throw some light on this.
any help will be appreciated.
please it's urgent.

raghava
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000