Re: [sqlite] Update vs Insert

2009-09-22 Thread Jay A. Kreibich
On Tue, Sep 22, 2009 at 11:31:16AM -0500, logan.rat...@emerson.com scratched on the wall: > > I am having problems with the update command (through the interface > > library). In most databases if you issue an update to a record that > > does not exist, it simply adds a new record. When I try

Re: [sqlite] Update vs Insert

2009-09-22 Thread Simon Slavin
On 22 Sep 2009, at 5:06pm, Barton Torbert wrote: > I am having problems with the update command (through the interface > library). Which interface library ? The sqlite3_ C calls ? Or a library or API for some other language ? > In most databases if you issue an update to a record that

Re: [sqlite] Update vs Insert

2009-09-22 Thread Logan.Ratner
>You can't do that with an 'update' but you can with 'insert or replace.' >This is true in any SQL driven database, not just SQL. (Er, that should read 'not just SQLite.') Logan Ratner | Software Engineer | Gas Chromatographs Emerson Process Management | 5650 Brittmoore Rd | Houston | TX | 77041

Re: [sqlite] Update vs Insert

2009-09-22 Thread Logan.Ratner
>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users->boun...@sqlite.org] On Behalf Of Barton Torbert >Sent: Tuesday, September 22, 2009 11:07 AM >To: General Discussion of SQLite Database >Subject: [sqlite] Update vs Insert > >Hello, > >I am having problems with

Re: [sqlite] Update vs Insert

2009-09-22 Thread Igor Tandetnik
Barton Torbert wrote: > I am having problems with the update command (through the interface > library). In most databases if you issue an update to a record that > does not exist, it simply adds a new record. No database I've ever heard of does that. It must be a feature

[sqlite] Update vs Insert

2009-09-22 Thread Barton Torbert
Hello, I am having problems with the update command (through the interface library). In most databases if you issue an update to a record that does not exist, it simply adds a new record. When I try this in SQLite I get an error back. Is the SQLite update restricted to a record you know