Distinct Sql??

  • Thread starter Thread starter perspolis
  • Start date Start date
P

perspolis

Hi everybody
is it possible to use Distict sql in DataTable.or DataView..
for example dt.DefaultView.RowFilter="Distinct Code";
??
 
perspolis,

No, it is not. However, you can write a function to do this for you
easily. Basically, you would sort the table (through a data view) on the
distinct fields in the table. Then, cycling through the rows, you would
check to see when the values change among the fields you are getting
distinct values for. If it changes, then you store the set of values, and
move on.

Hope this helps.
 

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

Back
Top