Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 06 Nov 2012 @ 20:55:01 GMT


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


Subj:   Re: How to remove dot (decimal) from exported file
 
From:   Dieter Noeth

Hi Sughesh,

just apply a format:

     cast(cast(col1 as format 'Z(18)') as char(18))

But be careful, a DEC(18,0) needs 19 characters as there might be negative values:

     cast(cast(col1 as format '-(19)') as char(19))

Both will left align the digits with trailing blanks.

If you need leading blanks/right aligned you need to switch to Teradata style casts:

     col1 (format '-(19)') (char(19))

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: 15 Jun 2023