Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum in XML Data Type
Message
 
 
À
19/05/2010 11:05:04
Moacyr Zalcman
Independent Consultant
São Paulo, Brésil
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Desktop
Divers
Thread ID:
01465102
Message ID:
01465218
Vues:
49
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform