Re: [sqlite] sqlite3 and vxWorks "database disk image is malformed"

2006-01-13 Thread Rachel Willmer
I don't know what caused this to happen but I've just had a similar problem. Use .dump and .read to dump the table and restore it, and the problem may go away (worked for me!) Rachel

Re: [sqlite] locking problem (on insert inside callback)

2005-12-04 Thread Rachel Willmer
Nah, ignore that, I was talking garbage... Using the view is a neater way of doing that select statement, but you still need to create the temp table to avoid the locking issues... Rachel On 03/12/05, Rachel Willmer <[EMAIL PROTECTED]> wrote: > (Replying to my own email so I

Re: [sqlite] locking problem (on insert inside callback)

2005-12-03 Thread Rachel Willmer
: Rachel Willmer <[EMAIL PROTECTED]> wrote: > I want to search two tables which should contain the same records and > add any that are missing from the second into the first. > > So I do > > SELECT * FROM table1 LEFT JOIN table2 on table1.field=table2.field > WHERE table2.f

Re: [sqlite] locking problem (on insert inside callback)

2005-10-14 Thread Rachel Willmer
> Solution 1 is to use a TEMP table: > > CREATE TEMP TABLE diffs AS > SELECT * FROM table1 LEFT JOIN table2 ; > SELECT * FROM diffs; -- Insert into table1 in the callback; > DROP TABLE diffs; that sounds like the answer for me thanks Rachel

Re: [sqlite] locking problem (on insert inside callback)

2005-10-14 Thread Rachel Willmer
> I'm not sure I understand your logic. Your left join > indicates that there are records missing from table2, > so I would expect that you want to insert the missing > records into table2. Assuming that's what you meant, > > insert into table2 > select * from table1 > where table1.field not

[sqlite] locking problem (on insert inside callback)

2005-10-14 Thread Rachel Willmer
Hi, apologies if this is a trivial question, but I'm a newbie to sqlite3. (very impressed so far) I want to search two tables which should contain the same records and add any that are missing from the second into the first. So I do SELECT * FROM table1 LEFT JOIN table2 on