Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using variable in SQL Select statement
Message
De
08/01/2001 17:46:04
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00460861
Message ID:
00460865
Vues:
7
>I have a grid with a cursor (alias) rowsource. There are also a few comboboxes on the same form that control the contents of the grid. One of the comboboxes controls the sort order. In my code right now, I have seperate SQL statements for each sort order. I'd like to have one SQL statement using a variable to control the 'order by' section.
>
>For example, the following code works:
>
>select * from tblgl order by tblgl.tempgl into cursor test
>
>The code below does not work:
>
>ctemp = "tblgl.tempgl"
>
>select * from tblgl order by (ctemp) into cursor test
>
>Is there a way to use a memory variable in a SQL Select statement?

Have you tried a macro???
SELECT * FROM tblgl ORDERY BY &cTemp INTO CURSOR test
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform