Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 08 Dec 2006 @ 21:51:00 GMT


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


Subj:   Re: Nth digit in a DECIMAL(10,0)
 
From:   Hough, David

Well, if you want to stay numeric and pick out digits from the left:

     ((c1 / (10**((log(c1)(integer))-3))) mod 10) (integer)

String conversion might be cheaper - you'd have to test.


/dave hough



     
  <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