Re: [sqlite] Upsert syntax question

2018-10-19 Thread David Raymond
ite.org] On Behalf Of Simon Slavin Sent: Friday, October 19, 2018 12:36 PM To: SQLite mailing list Subject: Re: [sqlite] Upsert syntax question On 19 Oct 2018, at 5:24pm, David Raymond wrote: > sqlite> insert into ids (id, in_new) select distinct id, 1 from gc_new on > conflict (id)

Re: [sqlite] Upsert syntax question

2018-10-19 Thread Simon Slavin
On 19 Oct 2018, at 5:24pm, David Raymond wrote: > sqlite> insert into ids (id, in_new) select distinct id, 1 from gc_new on > conflict (id) do update set in_new = 1; You can't supply a statement for ON CONFLICT. It can only trigger IGNORE / FAIL / ABORT / ROLLBACK / REPLACE.

[sqlite] Upsert syntax question

2018-10-19 Thread David Raymond
Maybe it's just Friday, but I can't figure out what I'm messing up here. Would some kind soul point me to where I'm messing up? Version 3.25.2 sqlite> create table ids (id int primary key, in_old bool, in_new bool); QUERY PLAN `--SEARCH TABLE sqlite_master USING INTEGER PRIMARY KEY (rowid=?) Run