SELECT Distinct from DataTable, without using SQL

D

Duncan M Gunn

Hi,

I have the following query I run using SQL:

Select Distinct col1 as D1, col2 as D2, count(col3) as CountOf
from MyTable
group by col1, col2
order by col1

I need to be able to get the same result without using SQL, by querying an
off-line DataSet.
XPath might be able to do the job, but it's completely new to me and it
appears that the data must be in a pre-defined format (i.e. sorted so that
"preceding-sibling" can be used).

Does anyone know of an XPath query that could do this, or are there methods
on DataSet/Table that can achieve this same result?

Thanks in advance,
Duncan
 
D

Duncan M Gunn

Thanks, I extended this to deal with multiple columns and return a
calculated field value.
 

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

Top