Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Jun 2003 @ 13:53:20 GMT


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


Subj:   Re: Overflow on count(*) in queryman, bteq, wddi
 
From:   Chauhan, Amit

ANSI mode uses DECIMAL because Teradata tables frequently have a cardinality exceeding the range of INTEGER. Teradata mode uses INTEGER to avoid regression problems. When in Teradata mode, if the result of COUNT overflows and reports an error, you can change the script to use CAST, as illustrated by the following example.

SELECT CAST(COUNT(*) AS DECIMAL(15,0) FORMAT 'Z(14)9')
FROM BIGTABLE;



     
  <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