Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELE .... UNION problem
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00846041
Message ID:
00846149
Views:
29
>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...
Previous
Reply
Map
View

Click here to load this message in the networking platform