Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 17 Jan 2012 @ 22:35:24 GMT


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


Subj:   How to CAST a number without getting a decimal point.
 
From:   DUELL, BOB

Hi,

How can I avoid the trailing decimal point in the result of casting a numeric result to character? In other words, this query:

     select cast( acct_id*-1 as char(29)) as new_acct_id
     from   my_table
     where  acct_id = 123775780

Results in a string "-123775780." (without the quotes of course). I want the result returned without the trailing decimal point.

I'm using SQL Assistant and the column data type is DECIMAL(15,0) if that matters.

I'*know* I've seen this somewhere. Thanks in advance!

Bob Duell
Manager, Systems and Integration
AT&T Mobility; CLM Database Marketing



     
  <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