/ View Ticket
Ticket UUID: 7b61b6c6ce7a8c23bdc5c25c88b4bc60b0208e0d
Title: insert mode is incorrectly converting text to numbers
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Low
Subsystem: Shell Resolution: Fixed
Last Modified: 2009-10-22 21:27:32
Version Found In: 3.6.18

The shell is deciding that a string looks like a number and then generating an insert that way. This is an unwarranted conversion but also loses information such as leading zeroes and probably also messing with strings that have digits and the letter E in them.

sqlite> CREATE TABLE test_table(city TEXT, zip TEXT);
sqlite> INSERT INTO test_table VALUES('Cambridge','02139');
sqlite> select typeof(city), typeof(zip) from test_table;
sqlite> .mode insert
sqlite> select * from test_table;
INSERT INTO table VALUES('Cambridge',02139);

shane added on 2009-10-22 19:38:33:
Check-in [ab99faca6c].

shane added on 2009-10-22 21:27:32:
Also check-in [790402c150].