>I forgot to mention that the ORDER BY clause in UNION SELECT can only reference columns by number not by name. Anyway UNIONless solution is simplier.SELECT "1" AS so, part_no As so2, * ;
> FROM bondmat ;
> WHERE stores ;
> UNION ALL ;
> SELECT "2" AS so, * FROM bondmat ;
> WHERE .NOT.stores
> ORDER BY 1, 2 ;
> INTO TABLE rcursor
>
Ah Ha!! Another crystal-clear error message.<g> That's one for my personal Tip-Trick-Trap file. Thanks for the follow-up clarification, and yes, the UNIONless version is less obfuscated.
Randy Bosma
VFP - Because life is too short to code in something else...