Selecting DISTINCT rows using DataTable.Select() method

Selecting DISTINCT rows using DataTable.Select() method

Post by FidoDidi » Thu, 25 Jul 2002 04:10:25



Can any give me a clue on how to do this.

Thanks

Fidel

 
 
 

Selecting DISTINCT rows using DataTable.Select() method

Post by Mathieu Lafontain » Thu, 25 Jul 2002 06:00:06


Sorry, but you can't do that with the DataTable.Select method...


Quote:> Can any give me a clue on how to do this.

> Thanks

> Fidel


 
 
 

Selecting DISTINCT rows using DataTable.Select() method

Post by FidoDidi » Thu, 25 Jul 2002 06:14:00


Ok. Do you have any idea on how to select distinct nodes from an XML data
using XPath or XSLT without having to manually iterate through the nodes of
the XML Data.


> Sorry, but you can't do that with the DataTable.Select method...



> > Can any give me a clue on how to do this.

> > Thanks

> > Fidel

 
 
 

Selecting DISTINCT rows using DataTable.Select() method

Post by Jimmy » Thu, 25 Jul 2002 08:59:22


if your datatable has a primary key, you can use:

DataTable.Rows.Find(objKey);
//here objKey is datatable's primary key.
//By definition, primary key must be unique and hence "distinct"

Jimmy W.


> Sorry, but you can't do that with the DataTable.Select method...



> > Can any give me a clue on how to do this.

> > Thanks

> > Fidel