Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 01 Sep 2004 @ 11:45:46 GMT


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


Subj:   Re: Conditionally Aborting a job
 
From:   teradatanewsgroup

try the follwing (not tested code) but make sure you have stats on the row_count table - the optimiser should know that only 1 row is in there.

     select *
     from table_a as a,
             table_row_count as b
     where 1=1 /* you don't need it but it documents that you know that you do a product join */
     group by b.row_count /* is a constant */
     having count(*) <> b.row_count
     .if errorcode <> 0 then .exit 8
     .if activitycount <> 0 then .exit 16;

--
Ulrich Arndt

www.data2knowledge.de



     
  <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