db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John English <john.fore...@gmail.com>
Subject Re: Updating 2 derby tables
Date Sat, 20 May 2017 16:35:03 GMT
On 20/05/2017 05:07, Bob M wrote:
>  Message: The statement was aborted because it would have caused a duplicate
> key value in a unique or primary key constraint or unique index identified
> by 'SQL170412104646890' defined on 'TRADES'.

Hint: it's always a good idea to give names to your constraints and 
suchlike, so that the error message will refer to a name that appears in 
your DB schema, rather than a system-generated name like 
SQL170412104646890. If you can't figure out which is the violated 
constraint referred to in the error message, you might have to dig 
around in SYS.SYSCONSTRAINTS to identify it.

It's also a good idea to post the actual output so that we can see what 
went wrong, rather than a bunch of source code that doesn't include the 
most important piece of information -- the error message!
John English

View raw message