All Forums General
smithaa 23 posts Joined 08/09
06 Apr 2010

how to assign the statement in bteq ?

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

robpaller 159 posts Joined 05/09
29 Jun 2010

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.

Adeel Chaudhry 773 posts Joined 04/08
29 Jun 2010


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.



-- If you are stuck at something .... consider it an opportunity to think anew.

You must sign in to leave a comment.