On 4 Jun 2012, at 6:39pm, Jörgen Hägglund <jorgenhaggl...@netscape.net> wrote:

> What I am trying to accomplish is an update from the source data. If the 
> entry is already there, just ignore it. Otherwise add the new data.

If any unique key (including the primary key) of the existing row and the new 
entry match, then you can avoid getting an error by using

INSERT OR IGNORE …

This means that if the INSERT would normally result in an error message about 
duplicate key values, SQLite does not do the new INSERT, but returns an 'OK' 
result code, as if the INSERT had worked.

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

Reply via email to