M
Michael Howes
I have a single DataTable in a DataSet. It has 4 columns and i'd like to
get a handful of counts of unique items in 3 of the 4 columns.
Can a DataTables Select or Compute methods to COUNT DISTINCT?
These two attempts failed
DataRow[] dr = ds.Tables[0].Select( "COUNT(DISTINCT(site_name))" );
object x = ds.Tables[0].Compute( "COUNT(DISTINCT(site_name))",
"ProductionCount > 0" );
The filter in the Compute I don't really want because I'd like to count
distinct on all rows..but the method forces me ot have a filter expression
thanks
mike
get a handful of counts of unique items in 3 of the 4 columns.
Can a DataTables Select or Compute methods to COUNT DISTINCT?
These two attempts failed
DataRow[] dr = ds.Tables[0].Select( "COUNT(DISTINCT(site_name))" );
object x = ds.Tables[0].Compute( "COUNT(DISTINCT(site_name))",
"ProductionCount > 0" );
The filter in the Compute I don't really want because I'd like to count
distinct on all rows..but the method forces me ot have a filter expression
thanks
mike