|
Home > Archive > MS SQL XML > January 2006 > Aggregate on XML Data Type
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Aggregate on XML Data Type
|
|
| Robert 2006-01-31, 11:24 am |
| Is there a way to aggreate data on the XML data type? I have found some
examples using XQuery, but they all invlove using the Let statement in FLWOR
which is not supported in SQL Server 2005. Are there any examples out there
that shows how to aggregate data on the XML data type?
Thanks
| |
| Tom Moreau 2006-01-31, 11:24 am |
| From the BOL:
SELECT ProductModelID,
Name,
Instructions.value('declare namespace
AWMI="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ ProductModelManuInst
ructions";
count(/AWMI:root/AWMI:Location)', 'int' ) as WorkCtrCount
FROM Production.ProductModel
WHERE ProductModelID=7
--
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Robert" <Robert@discussions.microsoft.com> wrote in message
news:DA76A4FD-57CB-455B-81B9- FD9EDD0A69E7@microso
ft.com...
Is there a way to aggreate data on the XML data type? I have found some
examples using XQuery, but they all invlove using the Let statement in FLWOR
which is not supported in SQL Server 2005. Are there any examples out there
that shows how to aggregate data on the XML data type?
Thanks
| |
| Galex Yen [MSFT] 2006-01-31, 8:25 pm |
| Robert,
It is possible that let is not needed in the examples you are referring to.
Can you supply one of these examples for further examination?
Thanks,
Galex Yen
"Robert" wrote:
> Is there a way to aggreate data on the XML data type? I have found some
> examples using XQuery, but they all invlove using the Let statement in FLWOR
> which is not supported in SQL Server 2005. Are there any examples out there
> that shows how to aggregate data on the XML data type?
>
> Thanks
|
|
|
|
|