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:
00319627
Vues:
11
Use macro substitution...

ORDER BY &mOrderBy

or try

ORDER BY (mOrderBy)

>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
>
>
>Would appreciate any help if somebody knows of a way to do accomplish this (or something akin to it). TIA, Chuck.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform