I'd say leave it as it is  .. ie "    12.34" is a string "12.34" is a 
number

This way you have all the options you need and it's up to the coder 
to decide what they want.
If "   12.34" is a string it's fine
If "   12.34" is *NOT* a string, then TRIM it and pass it SQLite 
cleaned up

If you change it, what happens if "   12.34" *IS* a string? It'll get 
converted to a number and you'll lose all those useful "     "'s 
which may not be want you want.

In the new case, you lose a choice (actually you lose real data)

> Ticket #1662 (http://www.sqlite.org/cvstrac/tktview?tn=1662)
> complains that SQLite is not converting strings into numbers
> if the string contains leading spaces.  This happens because
> SQLite just hands the string to strtod() and strtod() does not
> recognize numbers with leading spaces.  (Actually, strtod is
> not used - our own internal implementation gets called, but
> it works about the same.)


Reply via email to