Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT - SQL, Using Memory Variable With
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00319625
Message ID:
00319914
Vues:
13
>In trying to use a memory variable in the ORDER BY clause of a SELECT statement, I am getting the following error message...
>
>"SQL: Column 'MORDERBY' is not found.
>
>The code I am trying to run is as follows...
>
>DO CASE
>	* CASE Order By Cust
>	CASE ThisForm.optOrderBy.optOrderByCust.Value = 1
>		STORE "Cust, OrdDate, Invoice, Prodct" TO mOrderBy
>
>	* CASE Order By Product
>	CASE ThisForm.optOrderBy.optOrderByProduct.Value = 1
>		STORE "Prodct, OrdDate, Cust, Invoice" TO mOrderBy
>
>ENDCASE
>
>SELECT * ;
> FROM InvHist ;
> INTO ARRAY arrInvHist2 ;
> ORDER BY mOrderBy
>
>

You'd have to macro-expand mOrderBy in the last line - ORDER BY &mOrderBy

>Would appreciate any help if somebody knows of a way to do accomplish this (or something akin to it). TIA, Chuck.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform