Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 10 Nov 2009 @ 13:47:12 GMT


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


Subj:   Re: Need to select only the mantissa part
 
From:   Geoffrey Rommel

If you start with a decimal (or float) and want a numeric result, casting to character and back is inefficient. Arithmetic is better. For two decimal places:

     my_decimal MOD 1.00

or, if you want the result to look like an integer,

     cast(my_decimal MOD 1.00 * 100 as integer)


     
  <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