SELECT Distinct from DataTable, without using SQL

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Duncan M Gunn (gunnd_at_gaelqualityNOSPAM.co.uk)
Date: 01/27/05


Date: Thu, 27 Jan 2005 14:47:50 -0000

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



Relevant Pages

  • Re: SELECT Distinct from DataTable, without using SQL
    ... "Duncan M Gunn" wrote in message ... > I have the following query I run using SQL: ... > Does anyone know of an XPath query that could do this, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SELECT Distinct from DataTable, without using SQL
    ... > 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. ... >> group by col1, col2 ... >> Does anyone know of an XPath query that could do this, ...
    (microsoft.public.dotnet.framework.adonet)
  • Scope in derived tables
    ... This is kind of what I'm trying to do in my MS SQL 2000 query. ... I be able to reference s1.col1 inside the 2nd derived table? ... I'm getting 'Invalid column name col1' and it's coming from the 2nd ...
    (comp.databases.ms-sqlserver)
  • Re: 10g explain plan detemination without actually doing change in the query...
    ... col13 & col1 both are indexed. ... Then I may have different exectuin plan of the query. ... Is it poosible to find out in 10g to know what execution plan query ... Look into specifying a NO_INDEX hint for the SQL statement: ...
    (comp.databases.oracle.server)
  • RE: SELECT Distinct from DataTable, without using SQL
    ... ..NET component to allow full SQL syntax queries against a DataSet. ... "Duncan M Gunn" wrote: ... > group by col1, col2 ... > Does anyone know of an XPath query that could do this, ...
    (microsoft.public.dotnet.framework.adonet)