I set up an odbc connection and would like to retrieve data via SQL query:
I can execute this without a problem from the Stata command console. But running the same from within a .do file triggers the error
What am I not doing correctly?
Code:
local query "SELECT ..." clear odbc query "wdmsql01" odbc load, exec("`query'")
I can execute this without a problem from the Stata command console. But running the same from within a .do file triggers the error
Code:
table() or exec() is required
Comment