Cpmute values in Dataset Table??

  • Thread starter Thread starter jaawaad
  • Start date Start date
J

jaawaad

Does anyone know how i can compute values from dataset table before
assigning datagrid source to it???
My data table looks something like this.

DATE CAT STEP VALUE
---------------------------------------------------------------------------
01/16/2006 AAA1 50 1
01/16/2006 AAA1 50 1
01/16/2006 AAA1 50 1
01/16/2006 AAA1 50 1
01/16/2006 AAA1 100 2
01/16/2006 AAA1 100 2
01/16/2006 AAA1 100 2
01/16/2006 AAA1 100 2
01/17/2006 BBB1 50 3
01/17/2006 BBB1 50 3
01/17/2006 BBB1 50 3
01/17/2006 BBB1 50 3
01/17/2006 BBB1 100 4
01/17/2006 BBB1 100 4
01/17/2006 BBB1 100 4
01/17/2006 BBB1 100 4

What i want to do is to be able to sum "VALUE" for each step & date.

Final Output:

DATE CAT STEP VALUE
---------------------------------------------------------------------------
01/16/2006 AAA1 050 4
01/16/2006 AAA1 100 8
01/17/2006 BBB1 050 12
01/17/2006 BBB1 100 16

Thanks for your help!
 
Can you just write an SQL statement to grab the sum and then add to the
dataset?
 
This data table is a result of a SQL query which i cant change....so i
was wondering if there is a way to query a dataset table or view?
 
This data table is a result of a SQL query which i cant change....so i
was wondering if there is a way to query a dataset table or view?
 
Cor, thanks...i will look into this example. Althoght, i was wondering
if there was an easy way to query dataset table and make a new table
out of the result.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top