>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