Ticket Hash: | 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 15.49 years |
Created: |
2009-10-12 21:22:28 15.52 years |
Version Found In: | 3.6.18 |
Description: | ||||
http://www.sqlite.org/cvstrac/tktview?tn=3906
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; text|text sqlite> .mode insert sqlite> select * from test_table; INSERT INTO table VALUES('Cambridge',02139); shane added on 2009-10-22 19:38:33: shane added on 2009-10-22 21:27:32: |