Such o/p comes when the data type of the columns are defined as float,
you can CAST them to BIGINT or integer but they maybe truncated.
Consider the following examples
db2 => create table test (col_int integer, col_bigint bigint,col_float
float, co
l_decimal decimal(20,2))@
DB20000I The SQL command completed successfully.
db2 => insert into test values(123456789,123456789,123456789,123456789)@
DB20000I The SQL command completed successfully.
db2 => select * from [Email Address Removed] COL_BIGINT COL_FLOAT COL_DECIMAL
----------- -------------------- ------------------------
----------------------
123456789 123456789 +1.23456789000000E+008
123456789.00
1 record(s) selected.
db2 => select col_int,col_bigint,bigint(COL_FLOAT),bigint(COL_DECIMAL)
from test
@
COL_INT COL_BIGINT 3 4
----------- -------------------- --------------------
--------------------
123456789 123456789 123456789
123456789
1 record(s) selected.
db2 =>
Thanks & Regards,
Aniruddha Gupta
( +91-22-40187851
( +91-22-55597851
-----Original Message-----
From: benbart
[mailto:db2udbdba-ezmlmshield-x92012699.[Email address protected]
Sent: Tuesday, June 27, 2006 10:38 AM
To: LazyDBA Discussion
Subject: DB2 number formatting ...
Hi all,
Can someone please tell me how do I format these numbers under DB2?
+1.02400000000000E+006 +8.35584000000000E+005 +1.24184000000000E+004
That is, don't want to see exponential output or what function to use to
format
these when doing a SELECT. Thanks in advance.
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DISCLAIMER:
This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
DB2 & UDB email list listserv db2-l LazyDBA home page