Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 13 Feb 2004 @ 04:08:33 GMT


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


Subj:   Re: Volatile table existence check
 
From:   Jim Downey

This script releases a lock on a table and if it gets an error code=3807, it creates the table... otherwise it skips the ddl. The errorlevel statement forces bteq to return a code=0 for this specific error. I use this script for perm tables but it should work for volatile tables.

/***********************************************************************
 *** DDL SCRIPT: DWNO0181
 *** CREATE INCR TABLE
 ***
 **********************************************************************/
.LABEL DWNO018100
.SET ERRORLEVEL 3807 SEVERITY 0
RELEASE LOCK WORKDB_NDW.NOSS_NICOMML_INCR
,       OVERRIDE
;
.IF ERRORCODE<>3807 THEN .GOTO DWNO018199

CREATE ....your code here.....

.LABEL DWNO018199


     
  <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: 15 Jun 2023