default values are during INSERT...not SELECT.


I suppose it's possible Maestro is messing it up.



You just need to do an "update mytable set IsReplaced=0 where IsReplaced is 
null;"

You can do that from the shell.



Hopefully that makes your ADO happy.



If you want to test the shell then download the appropriate shell and do the 
alter table yourself.

You probably want the Windows binaries on here:

http://www.sqlite.org/download.html





Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems

________________________________
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Steffen Mangold [steffen.mang...@balticsd.de]
Sent: Wednesday, April 18, 2012 8:06 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with 
entityframework

>
> Have you checked your table afterwords to ensure you don't have any nulls in 
> IsReplaced?
>
> select count(IsReplaced) from mytable where IsReplaced is null;
>
> I tested and the alter table does fill with default values for me.  At least 
> from the sqlite shell.
>
> Does this work for you?  Are you doing the alter table via your program or 
> via the shell?
>
> 3.7.9
>
> sqlite> create table t(a integer);
> sqlite> insert into t values(1);
> sqlite> insert into t values(2);
> sqlite> alter table t add column b boolean not null default 0; select *
> sqlite> from t;
> 1|0
> 2|0
>

Hi Michael,

i alter it with a tool names "SQLITE Meastro" don't know with shell version the 
used.
So what you say it that "alter table t add column b boolean not null default 
0;" normaly replace all null fields with default value?

Then I think its comes from my tools. But I always thought that all existing 
field still stays NULL and sqlite only returns default value for these.

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

Reply via email to