Jeff Flowers wrote:
I have a database that contains a dollar value column but I have noticed
that SQLite drops the trailing zero. For example, "1.50" is displayed as
"1.5". I know that it is mathematically equivilent but is there a way to
make the second zero appear?
I am using SQLite 3.0.8 on Mac OS X 10.3.6. I am using the built in
SQLite frontend.
If you have a floating-point number internally and your interface
requests a string representation, then SQLite does the conversion
using sprintf() with a format of "%.15g". (vdbemem.c line 170.)
The command-line shell that comes with SQLite always requests all
values as strings. So "%.15g" is what you get.
If you write your own frontend, you can rig it so that floating-
point values are delivered as floating point values then you can
render them any way you want.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565