On Tue, 04 Sep 2007 07:53:08 -0600, you wrote: >I have an application that is inserting a record every second. There >are thousands of periods from a few seconds to hours long where the data >in all the columns is identical thus causing hundreds of thousands of >duplicate rows. > >Is there a way to set up the INSERT statement to allow the insertion of >a new row of data, where one or more columns has data != to the previous >insertion, but ignore or skip the insertion of a duplicate row? > >Scott
Perhaps: Specify all columns in the primary key, or define a separate table constraint UNIQUE (on,all,columns) ON CONFLICT IGNORE. The insert will fail. It depends on the conflict-clause what happens. Or you can use INSERT ... ON CONFLICT IGNORE. http://www.sqlite.org/lang_conflict.html -- ( Kees Nuyt ) c[_] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------