Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > .NET Framework 3.5
|
.NET Framework 3.5 For discussion of the Microsoft .NET Framework 3.5.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 3.5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2009, 04:36 AM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default LINQ query \ LAMBDA expression - complex requirement

Hi,
I have the below datatable created through my C# code:

Stock TotalPrice Qty TransactionType
XYZ 400 10 BUY
ABC 800 20 BUY
XYZ 800 20 SELL
ABC 400 10 SELL

I want this datatable to be processed by LINQ / LAMBDA expressions in such a way that will give me the below output in another datatable.
BASICALLY, THE NEED IS TO SHOW THE NET POSITIONS ON THE TRANSACTIONS MADE ON THE STOCK.

Stock Avg Price Qty TransactionType
XYZ 40 10 SELL
ABC 40 10 BUY

Can anybody please help me in writing a LINQ query \ LAMBDA expression for the above case.

Thanks in advance,
Sumit





Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding IEnumerable result set of a LINQ query prakashbpl .NET Framework 3.5 0 November 11th, 2008 04:41 AM
Expression Too Complex JCML Excel VBA 6 April 11th, 2007 08:36 AM
complex query g_vamsi_krish SQL Language 3 February 27th, 2006 10:48 AM
query too complex [email protected] Access 3 August 28th, 2003 09:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.