Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 26 Oct 2012 @ 15:55:17 GMT


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


Subj:   Re: Numeric overflow while doing UNION
 
From:   Curley, David

Without seeing what you're selecting, it's hard to diagnose the problem.

That said, it's unlikely that the sheer number of rows is the issue, though. I suspect it's that you're unioning two numeric fields with different datatypes, and there are values in the second select that don't fit in the type supplied in the first select.

For example, this throws the same error, which is fixed by reversing the two selects:

     select cast(1 as byteint)  x from sys_calendar.calendar where calendar_date =
     current_date union select cast(999999999999999 as decimal(15,0)) from
     sys_calendar.calendar where calendar_date = current_date;

Dave



     
  <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