Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View Macro Substitution in a SQL statement
Message
De
29/09/1997 15:24:56
 
 
À
29/09/1997 15:18:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00052240
Message ID:
00052259
Vues:
38
>How do you look at a SQL statement that has macro substitution in it before it executes?

Try using the whole query as a macro.

Instead of:
Select * from table where @myquerycondition

try

myquery = "select * from my table where " + myquerycondition
@myquery

This way way you can evaluate my query after it has been built.

Using macro substitution inside a query is a bad idea anyway because it forces SQL to evaluate the macro for every row, and slows the query dramatically. HTH
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform