/ Problem will be solved if SQLite will store such values as text ... so
/>>/ will behave like this:
/>>/ 1. is supplied value in TEXT (sqlite3_bind_text)
/>>/ 2. if yes then try convert this text value into INTEGER or REAL
/>>/ 3. convert back to text and compare with original value
/>>/ 4. if equal then store it as INTEGER or REAL, if not then store it as is
/>>/ as supplied in (1).
/
Does this mean that, say, '042' or '42.00' are stored as text?

no

Do you think that would be desirable?

no, of course

Base idea is store as TEXT when :
1. column value is supplied as TEXT (only in case sqlite3_bind_text)
2. conversion to REAL or INTEGER leads to loose of precision (digits)

I do not know details how to implement it ;-)
May be, 1. strip out leading and trailing spaces and zeroes 2. and then analyze string if contains only digits and decimal separator
3. count number of digits and if > than max precision for REAL or INTEGER then 
do not convert, but store as is

-Laco.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to