Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Wed, 02 Nov 2016 @ 10:43:34 GMT


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


Subj:   Re: Change VARCHAR(16) to BIGINT
 
From:   Dieter Noeth

Roopalini Bakthavachalam wrote

  I need to change a VARCHAR(16) field in a table to BIGINT. However it has alpha-numeric characters. Is it possible to change the datatype to BIGINT? Right now, I am getting 'Bad character in format or data' error.  


You can use TO_NUMBER which doesn't fail but returns NULL for non-numeric strings. Of course this might return decimal values, too, then you must decide how to deal with that.


Dieter



     
  <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: 24 Jul 2020