[EMAIL PROTECTED] wrote:
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
[EMAIL PROTECTED] a écrit :
So the question is: should this be changed. Should SQLite
ignore leading space in strings when trying to determine if
the string looks like a number.
[...]
Which is the correct behavior? Is this important enough to
change (and possible cause problems in legacy
Please leave the current functionality as is.
I believe it is the role of the host language to perform any editing or
translation of data, such as the removal of leading or trailing spaces, not
the SQL engine.
Regards.
rayB
** PLEASE CONSIDER OUR ENVIRONMENT BEFORE PRINTING
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
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,
5 matches
Mail list logo