XPath expression in SQL Express 2008 to return all attribute values?
Posted on 2008-10-31
I have some very basic XML in an XML column in a SQL Express 2008 database:
The T-SQL and XPath below will return a table with a single row containing "ChildA"
declare @Children xml;
select @Children=ChildXML from ChildTable
select @SCFVars.value('(//Parent/@ChildName)','char(35)') as ChildNameCol
Of course - if  is used instead of , I get a single row containing "ChildB".
Is there a way that I could get a table with all rows? I have been playing with XPath and keep getting a message that a singleton is required.