Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 09 Aug 2006 @ 20:53:38 GMT


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


Subj:   Re: Casting Char to Decimal
 
From:   smishra2

If contents os the char fields are all digits it should work.

     create volatile table t1 ( c1 char(30), c2 char(7)) on commit preserve rows;
     insert into t1 ( 'abcd', '1234.56');
     sel c1, c2 , cast(c2 as decimal(7,2)) from t1


     abcd         1234.56        1234.56


     
  <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: 23 Jun 2019