Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 15 Sep 2009 @ 14:14:53 GMT


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


Subj:   Re: INTEGER to VARCHAR data conversion strange
 
From:   Roth, David

Try making your varchar 11 in length. You are forgetting that integers have a sign +/- in addition to the 10 digits. People often miss this. Same applies to smallint, etc

     CREATE TABLE my_tab_ch
     (cl1 VARCHAR(11) NOT NULL) ;
     *** Table has been created.
     *** Time was 1 sec.       9/15/2009    7:01:09 AM


     INSERT INTO my_tab_ch SEL * FROM my_tab;
     *** Insert completed.  3 row(s) added.
     *** Time was 1 sec.       9/15/2009    7:01:09 AM


     SELECT *
     FROM my_tab_ch;
     *** Query completed.  3 row(s) found.  1 field(s) returned.
     *** Time was 1 sec.       9/15/2009    7:01:09 AM
     cl1
     -----------
           14444
               1
             144

Dave

David W. Roth
Teradata Certified Master
TERADATA



     
  <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