Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 08 Mar 2007 @ 14:08:53 GMT

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

Subj:   Re: Exiting on BTEQ errors
From:   Fred W Pluebell

You can modify the "severity" of various error codes using .SET ERRORLEVEL. For example:

* Allow WARNINGs but exit at first occurrence of higher severity .SET MAXERROR = 4;

* Can use .IF ERRORLEVEL or .IF ERRORCODE after requests, in addition to or instead of MAXERROR

* Temporarily downgrade "object does not exist" for DROP

          .SET ERRORLEVEL 3807 SEVERITY 4;
          DROP ...

* But if we get a "not found" later, e.g. on SELECT, treat it as an error

          .SET ERRORLEVEL 3807 SEVERITY 8;

And .SHOW ERRORMAP will display the system default severity assignments as well as any temporary user overrides.

  <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