Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > .NET Framework 3.5
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03: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 09:48 AM
query too complex liz@trinityholdings.co.za Access 3 August 28th, 2003 09:01 AM



All times are GMT -4. The time now is 10:06 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.