Schnoerkel

group by in queryTask(equal to group by in sql)

Discussion created by Schnoerkel on Jul 25, 2012
Latest reply on Jul 26, 2012 by Schnoerkel
Hey,

I search for a solution to group queryTask results. In my query:
        queryTask = new esri.tasks.QueryTask("url");
 query = new esri.tasks.Query();
 query.returnGeometry = false;
 query.outFields = ["tabellenspalte"];
 query.where = "tabellenspalte2= 'bedingung'"    
 query.orderByFields = ["ABS(tabellenspalte)"];
 queryTask.execute(query,functionweiter);


The Output is like

tabellenspalte:1
tabellenspalte:1
tabellenspalte:1
tabellenspalte:2
tabellenspalte:2
tabellenspalte:3
tabellenspalte:4
tabellenspalte:4

But i want only


tabellenspalte:1
tabellenspalte:2
tabellenspalte:3
tabellenspalte:4

Any suggestions?

Outcomes