Re: Getting all changes within a begin; end; transaction

Jose Isaias Cabrera <[email protected]> Wed, 4 Mar 2020 16:08:15 +0000
Newsgroups gmane.comp.db.sqlite.general
Message-ID <VI1P195MB0654E8151773E1A2A857E0A9DEE50@VI1P195MB0654.EURP195.PROD.OUTLOOK.COM>
Simon Slavin, on Wednesday, March 4, 2020 10:47 AM, wrote...
>
> On 4 Mar 2020, at 3:28pm, Jose Isaias Cabrera <[email protected]> wrote:
>
> > The reason why I know is that if I have 238 INSERTS, but I have a
> constraint , there should be 238 INSERTs the first time I run a set of SQL,
> but if I run the same SQL again, there should not be any records INSERTED,
> and thus, the amount should be 0, correct?
>
> Can you try the same thing but instead of INSERT use INSERT OR IGNORE ?

Simon Slavin, you are a genius!  Well, you're pretty smart. ;-)  Yes, indeed, I was using
INSERT OR REPLACE, which will always work. ;-)  INSERT OR IGNORE is now providing
the result I am looking for.  As we say in Spanish, muchas gracias.

josé
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users