I am trying to create a Bteq job that writes the SQL results to an output file with a seperator between each set of results.
I need help with making the seperator in the output file. Is it something like "print" or "echo"?
I am not seeing who to do it based on the info in here:
Desired output example:
Here is my Bteq code:
.export data file=/Output_File.out
Are you really wanting to use DATA format ( rather than REPORT format ) for the selected time stamps ?
ECHO is only allowed in macros, you need
select '_________' (title '');
Note that you will only get title values in field mode ( aka Report Mode ).
Also, just a point of clarification... The Teradata SQL statement "ECHO" can be used outside of a macro but can only echo BTEQ commands. To do what you were intending, you could employ the shell command "echo" via BTEQ's .OS command. However, only row data being returned from the database can be exported. So if you were to use a shell command you would need to redirect the OS output to append to the export file. To be able to do that, you have to issue an EXPORT RESET first. You might also have to consider newlines.