On Mon, 06 Dec 2004 19:32:44 -0500, D. Richard Hipp <[EMAIL PROTECTED]> wrote:
> 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.

Declaring the column as a TEXT value should help in this case, at
least, it did on my quick testing on the sqlite3 command line tool. In
this case it should be enough, or not?

Tiago

Reply via email to