On 15/02/2014 04:57, Bob M wrote:
Hi
I have a table in which the key is the first two fields viz date and time
the last two records in the table are
2014-02-14 0 .......................
2014-02-14 6 ......................
When I try to add a new record
2014-02-14 12 ........................
I get Error code-1, SQL state 23505
Insert command failed: The statement was aborted because it would have
caused a duplicate key value in a unique or primary key constraint or unique
index indentified by 'SQL14021012215370' defined on 'table name'
What does this error mean ?
Naming your constraints is a good idea, since then you can see exactly what is
being violated. It could be that the constraint that is causing the problem is
not the primary key in this table but something completely different. Without
seeing the table spec and the failing query, it's hard to tell from here.
--
John English