Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELE .... UNION problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00846041
Message ID:
00846149
Vues:
30
>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...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform