Yes, I am stupid...
My example was as I thought it works. In fact there was one more step.
CREATE TABLE IF NOT EXISTS 'test' (`testcol2` INTEGER);
ALTER TABLE 'test' ADD COLUMN `testcol` float;
INSERT INTO 'test' (`testcol`) VALUES ('');
SELECT * from 'test';
Yes, I know that table was alter
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
On 30 Jul 2015, at 3:04pm, hawk wrote:
> CREATE TABLE IF NOT EXISTS 'test' (`testcol` INTEGER);
> INSERT INTO 'test' (`testcol`) VALUES ('');
> SELECT * from 'test';
>
> and I get
> .0
Igor pointed out one problem: you explicitly defined the column as INTEGER,
therefore SQL is handlin
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
4 matches
Mail list logo