Home » SQL & PL/SQL » SQL & PL/SQL » 'unique constraint violation' (ORA-00001) at an INSERT
'unique constraint violation' (ORA-00001) at an INSERT [message #37030] Thu, 10 January 2002 21:46
Maarten Hoogland
Messages: 1
Registered: January 2002
Junior Member
Hello,

If I try to insert a record into the table 'bestel' which has an unique constraint 'acc_rn' that is selected while inserting I sometimes get a 'unique constraint violation' (ORA-00001) on the unique constraint 'acc_rn'. Most of the times it works OK. The sql-statement is:

INSERT INTO bestel (acc_rn, bsp_conco, bsp_couco, bsp_volgnr )
VALUES
((SELECT (MAX(acc_rn) + 1) FROM bestel), ' T', 45, 101)

Does anyone know what I can do to solve this problem?

kind regards,

Maarten Hoogland
Previous Topic: Basic Question
Next Topic: Manipulting Files
Goto Forum:
  


Current Time: Mon Aug 03 05:12:24 CDT 2020