Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 20 Mar 2007 @ 23:53:03 GMT


     
  <Prev Next>  
<<First
<Prev
Next>
Last>>
 


Subj:   How to run multiple BTEQ in BTET mode
 
From:   Kopuuravuri, Ramu

Hi,

I'm trying to run multiple BTEQ's in single BTEQ with BTET mode. If test2.bteq failed then test1.bteq should be rollback.

     bteq <${LOG_DIR}/${TBL_NAME}.${LOAD_DATE}.log 2>&1

     .SET SESSION TRANS BTET

     .run file $HOME_DIR/${TRGT_DBE}load.logon;

     BT;
     . run file test1.bteq;
     . run file test2.bteq;
     ET;

     .quit

I have environment variables defined in test1.bteq and test2.bteq.

ERROR:

     ------------------------------------------------------------------
     *** Failure 3704 '{' ('7B'X) is not a valid Teradata SQL token.
                    Statement# 1, Info =10
     *** Total elapsed time was 1 second.
     ------------------------------------------------------------------

     Sample query call by test1.bteq and test2.bteq

     update ${TRGT_DBE}.tbl_1
     set cod_desc = ml_rec.cod_desc,
         amt_dt = cast('${REF_TRANS_DT}' as date format 'yyyymmdd'),
         lst_updt_by = 'ETL',
         lst_updt_dt_tm = current_timestamp(0)
     WHERE ml_pln.pln_cd  = ${STG_DBE}.ml_rec.pln_id
           AND
           ml_pln.pln_desc  <> ${STG_DBE}.ml_rec.pln_desc ;

     .IF ERRORCODE <> 0 Then .QUIT 1

Regards,

Ramu.



     
  <Prev Next>  
<<First
<Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016