Re: [sqlite] primary key with bulk insert (UNION SELECT)

2012-10-16 Thread Alan Frankel
-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Davies Sent: Friday, October 12, 2012 8:42 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] primary key with bulk insert (UNION SELECT) On 11 October 2012 15:07, Alan Frankel alan.fran...@mathworks.com

[sqlite] primary key with bulk insert (UNION SELECT)

2012-10-12 Thread Alan Frankel
I have a table that uses an autogenerated id as primary key. I want to do bulk inserts using UNION SELECT, but it doesn't seem to be happy unless I specify an id for each row: sqlite create table CelestialObject (id INTEGER PRIMARY KEY, name VARCHAR(25), distance REAL); sqlite insert into

Re: [sqlite] primary key with bulk insert (UNION SELECT)

2012-10-12 Thread Simon Slavin
On 11 Oct 2012, at 3:07pm, Alan Frankel alan.fran...@mathworks.com wrote: I have a table that uses an autogenerated id as primary key. I want to do bulk inserts using UNION SELECT, but it doesn't seem to be happy unless I specify an id for each row: sqlite create table CelestialObject

Re: [sqlite] primary key with bulk insert (UNION SELECT)

2012-10-12 Thread Simon Davies
On 11 October 2012 15:07, Alan Frankel alan.fran...@mathworks.com wrote: I have a table that uses an autogenerated id as primary key. I want to do bulk inserts using UNION SELECT, but it doesn't seem to be happy unless I specify an id for each row: sqlite create table CelestialObject (id