PC Review


Reply
Thread Tools Rate Thread

aggregate from datatable

 
 
MattB
Guest
Posts: n/a
 
      18th Mar 2004
I know I could loop through the rows in a ado.net datatable to do this, but
is there a way to do the equivalent of "select sum(fiieldname) from table
where..." in a nice concise way? Thanks.


--

Matt

"Gravity. It's not just a good idea, it's the law!"


 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      19th Mar 2004
Hi,

See DataTable's Compute method.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"MattB" <(E-Mail Removed)> wrote in message
news:c3d765$268j0g$(E-Mail Removed)...
> I know I could loop through the rows in a ado.net datatable to do this,

but
> is there a way to do the equivalent of "select sum(fiieldname) from table
> where..." in a nice concise way? Thanks.
>
>
> --
>
> Matt
>
> "Gravity. It's not just a good idea, it's the law!"
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
More than one aggregate function in datatable.compute. Archana Microsoft ADO .NET 1 15th May 2008 08:03 AM
Help with an Aggregate Calculation Sum( DateTime ) in a DataTable edcha Microsoft C# .NET 2 20th Apr 2008 08:55 PM
Problem adding aggregate datacolumn to datatable Trygve Lorentzen Microsoft ADO .NET 3 30th Nov 2006 08:43 PM
Aggregate Functions in DataTable.Select Marcel Hug Microsoft C# .NET 2 5th Jan 2006 06:24 PM
Aggregate functions with GROUP BY Clauses on DataTable? =?Utf-8?B?Sm9iIExvdA==?= Microsoft Dot NET 1 2nd Aug 2004 07:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:55 AM.