BTEQ

General
Enthusiast

BTEQ

how to assign the statement in bteq ?

subj= 'science ' || v_process_cycle ||
' Run - Failed; :Group Code ' || in_group_cd || '; database ' || in_db_instance || '; ';
2 REPLIES
Enthusiast

Re: BTEQ

BTEQ does not support variable assignment like you would find in Oracle PL/SQL scripts.

- You can do pre-processing of your BTEQ Script and replace tokens in your SQL.
- You can use an volatile table to store a single column, single row that can be product joined with minimal impact to subsequent SQL statements to retrieve the results of that string concatenation.
Teradata Employee

Re: BTEQ

Hi,

This can also be done using stored-procedure (SP) .... i.e. doing all the pre-processing of a variable in a SP, and returning that in the BTEQ.

Another option can be to do pre-processing in SQL style either directly in BTEQ or MACRO and calling it in BTEQ.

Regards,

MAC