Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: sree_venPosted on 2009-04-15 at 01:34:47ID: 24145819
Do you need SQL part to get the result set based on your condition riod);
tity])) AS [TotalUnitsInStock], [t0].[OrderID] AS [Category]
Sum(GroupBy(name),absentpe
do able with linq:
var orders =
from o in OrderDetails
group o by o.OrderID into oID
select new {Category = oID.Key, TotalUnitsInStock = oID.Sum(o=>o.Quantity)};
orders.Dump();
SQL:
SELECT SUM(CONVERT(Int,[t0].[Quan
FROM [Order Details] AS [t0]
GROUP BY [t0].[OrderID]
using OrderDetails table from Northwind