Re: [sqlite] Re: create or update question

2007-04-03 Thread Mark Richards
Eric S. Johansson wrote: if the insert fails (i.e. record exists), it triggers an exception which I use to trigger an update. I get many more updates than inserts of course but I haven't figured out how to trigger an exception on update if the record doesn't exist. From the FWIW dept,

Re: [sqlite] Re: create or update question

2007-04-03 Thread Eric S. Johansson
Igor Tandetnik wrote: Eric S. Johansson <[EMAIL PROTECTED]> wrote: I'm trying to figure out how to do do the following: if the record exists Update record with calculation ( a = a + v) else insert record with default values It seems like the "insert or replace into" capabilities is close

[sqlite] Re: create or update question

2007-04-03 Thread Igor Tandetnik
Eric S. Johansson <[EMAIL PROTECTED]> wrote: I'm trying to figure out how to do do the following: if the record exists Update record with calculation ( a = a + v) else insert record with default values It seems like the "insert or replace into" capabilities is close to what I need but I