Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 26 Oct 2012 @ 17:16:51 GMT


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


Subj:   Re: Numeric overflow while doing UNION
 
From:   Myrna, James

Suresh,

I have seen in the past, that when you do a UNION of 2 SQL statements, the data type for the resulting column is based on the columns in the first SELECT statement. So if your first SQL is selecting a SMALLINT and your second query is selecting a BIGINT, the result column may be a SMALLINT and the value from the BIGINT won't fit into it. Try switching the order of the two queries or CAST the numeric columns to larger values.


Jim



     
  <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: 23 Jun 2019