Hi all. I have a file with a list of stats i have to collect (id, sentemce, date), and the Id of the stat according to a parameters table. I need to run the stat and insert a record in a log table with start_time and end_time. So I tought i could do a Bteq Import reading the file, that way I can insert into the log table with the Id of the stat when the execution starts and update it when it ends. The problem is between these two sentences i have to run the collect stats sentence wich would be in a bteq variable :stat. I tought I could do this with an Exec Sql :stat; but I cant make it work.
So the first question is, is it possible to use exec sql in a bteq import ? If not, any suggestions? If yes, can you share an example?