Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / June 2006

Tip: Looking for answers? Try searching our database.

How do I format a DOUBLE?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
apattin - 30 Jun 2006 22:02 GMT
Hi all,

We're using UDF 8.2.

How does one format a DOUBLE to, for example, 2 decimal digits? Sort of
like sprintf in C where you'd give a format pattern such as 4.2F . I
cannot find any formatting built-in functions. Using CHAR(my_double)
results in the number being presented in exponential form; DIGITS does
not work for DOUBLEs...

Thanks,

Alejandrina
Serge Rielau - 30 Jun 2006 22:24 GMT
> Hi all,
>
[quoted text clipped - 5 lines]
> results in the number being presented in exponential form; DIGITS does
> not work for DOUBLEs...
I would cast it to DECIMAL

Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ondemandbusiness/conf2006/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.