Is grouping possible with Dataviews or Datagrids?

I

Ivan Samuelson

I have a datagrid that I have populated via a DCOM object. Due to the
nature of the DCOM object, it sends back a row of data by using an
event. When it finally sends a "end of data" event, I know I've gotten
all my data.

This data consists of a date, counterparty, total energy scheduled and
total price of that scheduled energy. I want to take and sum up the
total energy and total price by counterparty.
Is there any easy way to do this with DataViews?

Again, this is NOT obtained by a direct select statement and I do not
have access to change the DCOM object, so I have to accept each row of
data, populate it into a dataset and then manipulate it from there, so
doing a SELECT...GROUP BY is not an option.

The net effect I want to achieve with the data would normally be
obtained through a SQL query as such:

SELECT counterparty, SUM(total energy), SUM(total price)
FROM some_Table
WHERE scheduleddate between TO_DATE('10/01/2003') and
TO_DATE('10/02/2003')
GROUP BY counterparty

Is there a way to do this with DataViews?

Thanks!
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top