Friday, May 28, 2010

SELECT DISTINCT

Interesting alternative to using SELECT DISTINCT if you’re loading results into a dataset. The following line creates a DataTable with only distinct rows:

DataTable dtDistinctData = dsData.Tables[0].DefaultView.ToTable(true);

No comments: