Hi, I'm actually using a DataView (because of Sorting) and am trying to sum with a group by. I have read about the DataTable compute method (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadataviewmemberstopic.asp). However, what i really need is a group by. In Sybase, i would do the following:
select Side, Ticker, Sum(Quantity)
from MyTable
group by Side, Ticker
My dataset is individual rows, each containing side, ticker, quantity.
I have had cheesy ideas like looping through using the Dataview.FilterRow method and writing to a table.
Any thoughts?
Start Free Trial