Home » SQL & PL/SQL » SQL & PL/SQL » PLEASE HELP ME WITH INSERT INTO TRIGGER
PLEASE HELP ME WITH INSERT INTO TRIGGER [message #19758] Sun, 07 April 2002 10:56 Go to next message
nicole
Messages: 10
Registered: January 2002
Junior Member
Hello,

I am trying to add a record into my sql database witht the following "when-button-pressed" trigger:

declare
v_ssn VARCHAR2(9);
begin
v_ssn := :patient.ssn;
insert into patient(ssn) values ('v_ssn');
commit;
end;

but i get the ERROR Message: FRM-3050: ORACLE error: unable to insert record.

Does anybody know what is wrong? please help me. Thanks! :)

Nicole
Re: PLEASE HELP ME WITH INSERT INTO TRIGGER [message #19759 is a reply to message #19758] Sun, 07 April 2002 18:06 Go to previous messageGo to next message
oraboy
Messages: 97
Registered: October 2001
Member
insert into patient(ssn) values (v_ssn);

shud work
Re: PLEASE HELP ME WITH INSERT INTO TRIGGER [message #19763 is a reply to message #19758] Mon, 08 April 2002 03:46 Go to previous message
anuca
Messages: 1
Registered: April 2002
Junior Member
probably caused by an Oracle error (attempt to insert a null value in a not null column, or invalid type like inserting characters in a numeric column)
Try to prompt out the Oracle error message (now You are getting the Forms error message) handling the exception and prompting the oracle variable sqlerrm
Previous Topic: how to use substr??
Next Topic: how do i get a magazine
Goto Forum:
  


Current Time: Fri Apr 26 19:04:36 CDT 2024