Re: [sqlite] Multi-column unique constraint in SQLite

2011-09-12 Thread liviodl
moving it, everything worked fine. Thanks again, Livio -- View this message in context: http://old.nabble.com/Multi-column-unique-constraint-in-SQLite-tp32441748p32446094.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users

Re: [sqlite] Multi-column unique constraint in SQLite

2011-09-11 Thread Jay A. Kreibich
On Sun, Sep 11, 2011 at 03:00:10PM +0100, Simon Slavin scratched on the wall: > On 11 Sep 2011, at 2:49pm, Jay A. Kreibich wrote: > > >> I think that the 'OR REPLACE' clause refers to the primary key, > > > > No, it will trigger on any UNIQUE constraint violation. > > > > My guess is that one

Re: [sqlite] Multi-column unique constraint in SQLite

2011-09-11 Thread Kees Nuyt
On Sun, 11 Sep 2011 04:42:37 -0700 (PDT), liviodl <livi...@gmail.com> wrote: > >Hi guys, > >I'm trying to create a multi-column unique constraint in SQLite, but I don't >have success. In table "players", I've created the following index: > >CREATE UNIQ

Re: [sqlite] Multi-column unique constraint in SQLite

2011-09-11 Thread Simon Slavin
On 11 Sep 2011, at 2:49pm, Jay A. Kreibich wrote: >> I think that the 'OR REPLACE' clause refers to the primary key, > > No, it will trigger on any UNIQUE constraint violation. > > My guess is that one of the individual columns has a UNIQUE constraint. > > Is "id" or one of the other

Re: [sqlite] Multi-column unique constraint in SQLite

2011-09-11 Thread Jay A. Kreibich
On Sun, Sep 11, 2011 at 02:00:48PM +0200, Bernd Lehmkuhl scratched on the wall: > Am 11.09.2011 13:42, schrieb liviodl: > > > >I'm trying to create a multi-column unique constraint in SQLite, but I don't > >have success. In table "players", I've created the foll

Re: [sqlite] Multi-column unique constraint in SQLite

2011-09-11 Thread liviodl
a violation of a UNIQUE INDEX occurs? I don't have other keys configured on the table, just the one I wrote above... -- View this message in context: http://old.nabble.com/Multi-column-unique-constraint-in-SQLite-tp32441748p32442052.html Sent from the SQLite mail

Re: [sqlite] Multi-column unique constraint in SQLite

2011-09-11 Thread Bernd Lehmkuhl
Am 11.09.2011 13:42, schrieb liviodl: Hi guys, I'm trying to create a multi-column unique constraint in SQLite, but I don't have success. In table "players", I've created the following index: CREATE UNIQUE INDEX "players_unique" ON "players" ("i

[sqlite] Multi-column unique constraint in SQLite

2011-09-11 Thread liviodl
Hi guys, I'm trying to create a multi-column unique constraint in SQLite, but I don't have success. In table "players", I've created the following index: CREATE UNIQUE INDEX "players_unique" ON "players" ("id" ASC, "skill" ASC, "stag