| 
		
			| not able to  insert record [message #216532] | Mon, 29 January 2007 04:36  |  
			| 
				
				
					| oracle06 Messages: 36
 Registered: December 2005
 | Member |  |  |  
	| Hello All, I am getting frm-40508 unable to insert record,on pressing shift + F1 I am getting database error ora-00001:unique constarint(name of the key)violated.
 actually I am inserting two records with type P and A if I delete the record of type p and again i insert the record then it tries to insert in type A also then it gives above error.
 and not saving the records.
 
 for solving this i used on-insert trigger,I have written insert_record in this trigger now it is saving but before saving it is giving same error.
 
 how to solve this.
 
 please guide asap
 
 thanks.
 |  
	|  |  | 
	|  | 
	| 
		
			| Re: not able to  insert record [message #216611 is a reply to message #216583] | Mon, 29 January 2007 12:29  |  
			| 
				
				|  | Littlefoot Messages: 21826
 Registered: June 2005
 Location: Croatia, Europe
 | Senior MemberAccount Moderator
 |  |  |  
	| Simply, don't insert a record which has the same combination of values in primary key constraint columns as the one that already exists in a table. The same goes for update. |  
	|  |  |