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

Click here to load this message in the networking platform