Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 xquery urgent

Author  Topic 

raghava
Starting Member

3 Posts

Posted - 2006-03-02 : 08:46:32
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
   

- Advertisement -