Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum in XML Data Type
Message
 
 
To
19/05/2010 11:05:04
Moacyr Zalcman
Independent Consultant
São Paulo, Brazil
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Application:
Desktop
Miscellaneous
Thread ID:
01465102
Message ID:
01465218
Views:
47
Check if this thread http://social.msdn.microsoft.com/Forums/en-US/transactsql/threads?page=4 can be of help.

>Hi
>
>I have a table of sales with a field ID and a field Itens XML Data Type like
>
>  OrcamentoItens
>  Produto
>    ProdID 100399/ProdID
>    Qtd 2 /Qtd
>    ValorU 12.80 /ValorU
>    Obs /
>    Grade P/01 M/01 G/0 /Grade
>  /Produto
>  Produto
>    ProdID 101548 /ProdID
>    Qtd 1 /Qtd
>    ValorU 18.60 /ValorU
>    Obs /
>    Grade P/0 M/0 G/01 GG/0 /Grade
>  /Produto
>/OrcamentoItens
>
>
>I´d like to have the sum of Qtd*ValorU grouped by id. How to use XQuery to get this result?
>
>Thanks
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform