Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a variable in a select statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00047445
Message ID:
00047563
Vues:
27
If you are only dealing with one table then you don't need to qualify the field. Surround the variable name with parentheses, creating a name expression:
SELECT * FROM table_name WHERE (VarFieldName) = VarFieldText
Some may suggest macro substitution, &VarFieldName, but name expressions are faster.

If you must qualify the table then try:
SELECT * FROM table_name WHERE ('table_name.' + VarFieldName) = VarFieldText
Be sure to include the period after the table name in quotes.

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform