Hi Everyone,
Thanks for the responses. Since the first couple of SELECTs I needed to update were SELECTs against a an existing cursor, it was easy enough to write a function to return me a string of the underlying fields - with the "real" GROUP BY field first (don't jump on me for saying "real"!). This was the quick way to retrofit without having to use SET ENGINEBEHAVIOUR on and off whereever I did not want to retrofit. I already had a function that returned a list of all the fields for a table or cursor and so I just had to modify it to pass in the fields that I wanted to be first in the string.
This turned out to be fairly quick. Here is some of the code:
STORE MakeFieldsList("File_ID, Partner_ID") TO lcGroupByClause
SELECT ;
<whole wack o' fields...> ;
FROM SomeCursor ;
GROUP BY &lcGroupByClause
INTO CURSOR Temp
This seems to be neat and tidy for the retrofits that I have first run into. All the "extra" group by fields pretty well are identical so too bad there is not an Any() function like Dragan suggested.
Thanks again.
Albert