Never mind Simon. It turns out that SQLite allows NULLable fields to participate in UNIQUE indexes.
I'd screwed up the code I'd made to replace anything undefined with "". I've changed it, and it's properly saving empty strings now, and the index is now successfully ignoring identical row insert attempts. Thanks mate. On Fri, Mar 28, 2014 at 12:42 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 28 Mar 2014, at 1:12am, SongbookDB <shaun_thom...@songbookdb.com> > wrote: > > > However, if, for example the DiscId is blank, but the artist and title > are > > not, a new record is created when there is already one with a blank > DiscId > > and the same artist and title - BAD. > > What's the primary key on that TABLE ? Include both the column name and > the column's affiliation. > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Shaun Thomson Owner - SongbookDB _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users