Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > convert a decim...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 8864 of 9056
Post > Topic >>

convert a decimal number into character

by karanbikash@[EMAIL PROTECTED] May 7, 2008 at 04:54 AM

hi ,
I have a column with datatype as decimal(31,2) . The data is like
123456.67  , 7634578.99
Is it a way to convert the entire number into character . like
'1232456.67'     .

The output should not be like as below :
db2 => select char(decimal(BAL_PRINCIPAL,31,2)) from
BIKASHK.RPT_BA_PAD331 where
 integer(Bal_principal)!=0

1
---------------------------------
00000000000000000000010025000.00
00000000000000000000010025000.00
00000000000000000000010025000.00
00000000000000000000010025000.00

  4 record(s) selected.

Rather It should be

10025000.00
10025000.00
10025000.00
10025000.00

For the above 4 rows and it should be 'char' in data type.

Appreciate your help .
Best Regards
Bikash Karan
 




 3 Posts in Topic:
convert a decimal number into character
karanbikash@[EMAIL PROTEC  2008-05-07 04:54:39 
Re: convert a decimal number into character
Serge Rielau <srielau@  2008-05-07 08:34:10 
Re: convert a decimal number into character
karanbikash@[EMAIL PROTEC  2008-05-08 02:33:09 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 21:53:58 CDT 2008.