Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Informix 4GL sql error.

Status
Not open for further replies.

magni

Programmer
Oct 11, 2007
12
CA
Hi, I have the following code in Informix 4GL, but I am running problem and unable to findout, please help me. Thank you.

CREATE PROCEDURE trig_insert_test1(ncode CHAR(2), nname CHAR(32))
DEFINE ocode CHAR(2);
FOREACH SELECT code INTO ocode
FROM state
WHERE code = ncode OR sname = nname
RAISE EXCEPTION -271, 100, "Value already exists";
END FOREACH;
END PROCEDURE


create trigger inst_test1 insert on state
referencing new as new
for each row (execute procedure trig_insert_test1(new.code,new.sname));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top