Sometimes it is easier - among others, for debugging purposes - to separate a single SQL - SELECT command into several.
SELECT ... (union goes here) ... into cursor Tmp nofilter
SELECT * from Tmp into cursor Tmp group by MyField
Yes, you can (usually) send the result from cursor Tmp back into cursor Tmp! However, again for debugging purposes, you may want to keep a separate cursor.
Regards, Hilmar.
>I don't know. Maybe I put it in the wrong spot? I thought maybe the group by was just applying to one of the selects and not the whole union. At any rate, it didn't eliminate the duplicates.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)