Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum in XML Data Type
Message
From
19/05/2010 11:05:04
Moacyr Zalcman
Independent Consultant
São Paulo, Brazil
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Sum in XML Data Type
Environment versions
SQL Server:
SQL Server 2005
Application:
Desktop
Miscellaneous
Thread ID:
01465102
Message ID:
01465102
Views:
106
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
Next
Reply
Map
View

Click here to load this message in the networking platform