Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Rick Kohrs
Not possible in my case, but something to keep in mind for my next project. Thanks all for helping out a newbie. > On Oct 21, 2016, at 7:30 PM, Keith Medcalf wrote: > > > And what about NULL values? > >> All fields would match in an existing record compared to that of

Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Keith Medcalf
Of course, allows "duplicate" rows to be inserted if one (or more) of the fields are NULL: sqlite> create table x(x int, y int, unique (x,y)); sqlite> insert into x values (1,1); sqlite> insert into x values (NULL,1); sqlite> insert into x values (1,NULL); sqlite> insert into x values (1,1);

Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Keith Medcalf
And what about NULL values? > All fields would match in an existing record compared to that of a > proposed new record. That help? > > On 10/21/2016 4:49 PM, Simon Slavin wrote: > > On 21 Oct 2016, at 10:46pm, Rick Kohrs wrote: > > > >> I want to make sure that I do

Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Simon Slavin
On 21 Oct 2016, at 10:53pm, Rick Kohrs wrote: > All fields would match in an existing record compared to that of a proposed > new record. That help? So if two rows had all fields identical except for segment, they are not identical ? Okay, in that case CREATE

Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Rick Kohrs
All fields would match in an existing record compared to that of a proposed new record. That help? On 10/21/2016 4:49 PM, Simon Slavin wrote: On 21 Oct 2016, at 10:46pm, Rick Kohrs wrote: I want to make sure that I do not insert a new record if ALL of the variables

Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Jens Alfke
> On Oct 21, 2016, at 2:46 PM, Rick Kohrs wrote: > > INSERT or IGNORE does not seem to be working as expected. The “or IGNORE” part describes what happens if there’s a conflict that would otherwise cause the INSERT to fail. Your schema doesn’t declare any column or

Re: [sqlite] Using IGNORE for complete record match

2016-10-21 Thread Simon Slavin
On 21 Oct 2016, at 10:46pm, Rick Kohrs wrote: > I want to make sure that I do not insert a new record if ALL of the variables > match. I can potentially have 3 systems writing to the same database and I > don't want duplicate records > > sqlCommand = """

[sqlite] Using IGNORE for complete record match

2016-10-21 Thread Rick Kohrs
I want to make sure that I do not insert a new record if ALL of the variables match. I can potentially have 3 systems writing to the same database and I don't want duplicate records sqlCommand = """ CREATE TABLE himawari_db ( dateTime TEXT,