I am querying a list of all IterationIDs and their corresponding IterationPath. The following code works and produces a long list with several repeated rows:
WorkItemCollection queryResults = workItemStore.Query(
"Select [System.IterationID], [System.IterationPath] " +
"From WorkItems");
foreach(WorkItem workitem in queryResults)
{
Console.WriteLine("IterationID: {0}\t IterationPath: {1}", workitem.IterationId, workitem.IterationPath);
}
I am attempting to select only distinct rows, sadly the DISTINCT
clause does not seem to work with WIQL as it does in SQL. Is creating this list possible using WIQL?