Archives of the TeradataForum
Message Posted: Tue, 29 Jan 2002 @ 08:56:29 GMT
The USING clause in a BTEQ has traditionally been used to import variables into an SQL procedure. The main drawback was the inability to directly parameterise the target table name. The workaround is to import the target table name from a host file, export an SQL statement then perform a .RUN on the result.
It goes something like this (untested, and it's b4 9am GMT):
/* The file containing the target table name(s) */
/* Repeat for each record on the input file */
/* The file containing the generated SQL */
/* Generate the SQL */
/* Run the generated SQL */
We have used this technique recently to generate lengthy update/insert operations on IOS tables within the Teradata CRM application. The name of the target tables is ever-changing, hence the need for parameterisation.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|