Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 06 Nov 2012 @ 18:11:46 GMT


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


Subj:   Re: How to remove dot (decimal) from exported file
 
From:   Anomy Anom

< -- Anonymously Posted: Tuesday, November 06, 2012 12:32 -- >

Apply an explicit FORMAT to the decimal column, before casting to CHAR. The default for DECIMAL(18,0) is FORMAT '-(18)9.'

For no sign and no decimal point, something like this should work:

     CAST(CAST(col1 as DECIMAL(18,0) FORMAT 'Z(17)9') AS char(18))


     
  <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