I'm just beginning to look at sqlite so this approach might not apply.
In instances where I had no control on the input stream and an occasional duplicate could occur I fed the input stream into a temp table then used a select from that temp with a count function and a group by ID, DateTime where
count < 2. That will filter the dups or count > 1 to find the dups.

Lyle Ward

On 2018-09-14 16:05, Simon Slavin wrote:
On 14 Sep 2018, at 8:56pm, Andrew Stewart <astew...@arguscontrols.com> wrote:

CREATE TABLE dataStreamRecord (
    fwParameterID INTEGER NOT NULL,
    dateTime INTEGER NOT NULL,
    data INTEGER NOT NULL,
    UNIQUE (
        fwParameterID,
        dateTime
    )
);

Well, there is only one UNIQUE constraint there.  Unless you have a
UNIQUE INDEX on that table, that must be the constraint that's causing
the problem.

As a diagnostic test to figure out what's wrong, you might want to
remove the UNIQUE constraint on the TABLE and allow the data to be
inserted into it.  You could then print the resulting data to a text
(CSV ?) file, and use a spreadsheet program to look for duplicate
values.

Or you might have a better idea about how to find your problem.

PS: Your method of reply is fine.  You can keep doing that.  All
replies should go to the entire mailing list because we frequently
improve each-other's solutions.

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

Reply via email to