I'm new to Teradata. Extensive experience with UDB. I'm trying to convert some KSH scripts that we use for job control to hit a TD DB instead of a UDB DB. The problem I'm having is all the extra stuff that comes back with a bteq result set.
With udb I can assign a variable like this
var1="db2 -x 'select distinct field1 from table1'"
That statement will return just field1 and assign the value to var1.
I can't do that with bteq. I have to create an sql file that exports field1 to another file that I then cat into the variable. There has to be a more graceful way!
Like the man said no can do, but here's one option you might try. Granted this is a hack but it avoids exporting. The perl ditty reads the stdout and prints just the value after the pattern you put in the output. This website clobbers the two < signs so replace the > with <.
#replace > with < cuz teradata.com is clobbering it