Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 01 Nov 2002 @ 13:07:37 GMT


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


Subj:   Insert SQL Error code into Audit tables within BTEQ
 
From:   Ganesh Sundaralingam

Hi All,

I'm using BTEQ to load data to the warehouse with bteq functionality for error handling. I also would like to store this information in audit tables in the warehouse.

For example:

.LOGON TERA101,BMG

DATABASE MARKET;

INSERT INTO INDIVIDUAL
SELECT
 *
FROM
INDEV

.IF ERRORCODE <> 0 THEN .GOTO FAILRUN

***********************************************************************
.LABEL THEEND
*** THE jOB completed SUCCESSFULLY

.QUIT 0

.LABEL FAILRUN
**************
.QUIT 99

For instance, I would like to insert the ERRORCODE and ACTIVITYCOUNT value to an Audit table.

I can do this within a stored procedure, would this be also possible within a BTEQ script.

Would much appreciate any help on this.

Best regards,

Ganesh



     
  <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