November 7, 2007 at 5:06 am
Hi guys,
I have a small problem 🙂
I have a stored procedures which has an input parameter @XmlDocumet of type XML.
The xml looks like this:
How can i retrieve the information, using one select statement and XQuery methods, so i have the rows like this:
First_Name Last_Name Age
Oana Schuster 25
Daniel Marti 26
Is it possible?
Thanks in advance 🙂
Oana.
November 7, 2007 at 5:10 am
I don't know what happend with the xml example 🙁
Schuster</Last_Name?
Marti</Last_Name?
November 7, 2007 at 5:13 am
wow 🙁
I hope this time you can see the xml example.
Sorry ...
November 7, 2007 at 6:46 am
select r.value('First_Name[1]','varchar(10)') as First_Name,
r.value('Last_Name[1]','varchar(10)') as Last_Name,
r.value('Age[1]','int') as Age
from @Xmldocument.nodes('/Data/Customer') as d(r)
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537November 7, 2007 at 7:01 am
Thank you so so so much 🙂
Oana.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply