Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View Macro Substitution in a SQL statement
Message
From
29/09/1997 15:24:56
 
 
To
29/09/1997 15:18:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00052240
Message ID:
00052259
Views:
33
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform