Great. Thanks for that hint. 

On Thursday, 9 August 2012 12:57:31 UTC+2, Steve McLeod wrote:
>
> I think you need to use the MERGE command instead of the INSERT command. 
> Docs for MERGE are here:
> http://www.h2database.com/html/grammar.html#merge
>
>
> On Wednesday, 8 August 2012 15:13:21 UTC+2, Johannes Schneider wrote:
>>
>> Hi guys,
>>
>> I have a table with a unique index (id + time stamp). In this table I am 
>> storing a lot of values I receive from another service.
>> I am storing the data using a prepared statement in batches of about 400 
>> entries.
>>
>> Unfortunately this service might provide me with duplicate data. Now I 
>> just want to ignore those duplicate data (since it already exists within 
>> the db).
>>
>>
>> Of course I run into a  lot of "Unique index or primary key violation". 
>> That exceptions fails my complete transaction. But I just want the two or 
>> three problematic entries ignored...
>> I could add each of the entries within its own transaction. But I fear 
>> the performance penalty...
>>
>> Any ideas how that could be solved?
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/dAXwshROlqsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to