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

Re: SELECT Distinct from DataTable, without using SQL by W

W
Thu Jan 27 08:50:54 CST 2005


http://support.microsoft.com/default.aspx?scid=kb;en-us;326176
--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Duncan M Gunn" <gunnd@gaelqualityNOSPAM.co.uk> wrote in message
news:%23sZR17HBFHA.1188@tk2msftngp13.phx.gbl...
> 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
>
>



Re: SELECT Distinct from DataTable, without using SQL by Duncan

Duncan
Fri Jan 28 05:41:18 CST 2005

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



RE: SELECT Distinct from DataTable, without using SQL by AdrianMoore

AdrianMoore
Sat May 14 11:46:03 CDT 2005

You might also want to check out this web-site that promises to provide a
.NET component to allow full SQL syntax queries against a DataSet.

http://queryadataset.com

Hope this helps
Ad.


"Duncan M Gunn" wrote:

> 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
>
>
>

Re: SELECT Distinct from DataTable, without using SQL by Val

Val
Sun May 15 07:38:21 CDT 2005

Hi,

It could help you

http://support.microsoft.com/default.aspx?scid=kb;en-us;325684&Product=adonet

--
Val Mazur
Microsoft MVP

http://xport.mvps.org



"Adrian Moore" <AdrianMoore@discussions.microsoft.com> wrote in message
news:6F3969F7-FABF-442F-A3EA-237B2C77AC93@microsoft.com...
> You might also want to check out this web-site that promises to provide a
> .NET component to allow full SQL syntax queries against a DataSet.
>
> http://queryadataset.com
>
> Hope this helps
> Ad.
>
>
> "Duncan M Gunn" wrote:
>
>> 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
>>
>>
>>