Teradata BTEQ to export results with its corresponding SQL

116 Views Asked by At

I'm new to teradata BTEQ concepts. I was trying to run SQLs from file using BTEQ:

.logon/usr,PWD
.set width 300
.export report file=output.log
.run = sqlfile
.export reset
.logoff
.quit

In above BTEQ, input run SQLfile would be having multiple queries, when I tried to export only results was coming up in output files but I need data with its corresponding query which was executed. Any suggestions please

Output file needs to have both query and result from tables

1

There are 1 best solutions below

0
On

BTEQ always echoes the input instructions. So you would by default get to see the queries before their result set in the export file. Probably your RUN file uses the command ECHOREQ OFF, which inhibits echoing of the requests.