>I have a string variable that contains a SQL statement I want to run. How can I 'execute' this variable so the program recognizes the query and runs it?
Be careful when macro expanding your SQL like Ed and Stephen have shown you, that the SQL was not built using Semi-colon as line dividers- since the statement is executed as a single line, they break the parser and cause errors.
Erik Moore
Clientelligence