Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 10 Jun 2004 @ 08:57:03 GMT


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


Subj:   Re: How do I CAST a numeric into a numeric?
 
From:   Dieter Noeth

Bob Duell wrote:

  I need to CAST a decimal column as a left-justified character string. I've tried the CAST function, but the result has a period at the end.  


  For example, when I do: select cast(server_num as char(16)) as server_locator  


  The result string is: "123456." (with the period at the end).  


  I guess this has something to do with a default format. Can anyone help me with this?  



     cast((server_num (format 'Z(16)')) as char(16))

or if you want a VarChar:

     trim(server_num (format 'Z(16)'))

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