On 7/30/2015 10:04 AM, hawk wrote: > Here is my problem. I have strings that "looks" like a numbers. But they > aren't (at least for me). > I am aware that SQLite handles types on it's own and makes conversion to > INTEGER or REAL if it is possible (sqlite.org/datatype3.html). The problem > is that I got ".0" at every number I put into SQLite. Is it possible to > read values exactly as they were? > > Example: > > CREATE TABLE IF NOT EXISTS 'test' (`testcol` INTEGER);
If you want the column to store text exactly as it was inserted, then why do you declare it with INTEGER type? Make it TEXT. > INSERT INTO 'test' (`testcol`) VALUES ('1111'); > SELECT * from 'test'; > > and I get > 1111.0 Can't reproduce. I get 1111. The problem is somewhere in the part of the setup you haven't shown. -- Igor Tandetnik