Razzak, Dennis, Albert : >> Create a VIEW with all those GROUP BY conditions and then use: SELECT COUNT(*) INTO vCount INDIC IvCount FROM ViewName + WHERE clause .... If it is what you want you can use INSERT to put the results in a temporary table to evaluate further. Try creating a view to do the group by, then looking to see if there are one or more rows in the view. << As I prefer not creating temp view/table for something so simple, here is my solution : OUTPUT FileName SELECT numcde FROM ligne WHERE numcde = .vnumcde + GROUPED BY cndp, cgratuit, cpaysori, cpreference, + cana1, cana2, cana3, cana4, cana5, + ctaxe1, tauxt1, ctaxe2, tauxt2, ctaxe3, tauxt3, ctva + HAVING COUNT(*) > 1 SET VAR vINT = .verr OUTPUT SCREEN IF vINT = 0 THEN PAUSE 2 USING 'One or many GROUPED BY rows' ELSE PAUSE 2 USING 'No GROUPED BY rows' ENDIF Thanks for your help ... J.M. GRATIAS, Logimatique, France
