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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger to display error

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
US
I am trying to create a trigger that will display an error custom error message but can not get the syntax correct. I thought it was something to the effect of:

...
begin
raiserror 999 ''You have encountered an error'';
end;

This unfortunately is not working. Can someone lend some advice? Thanks.
 
[tt]DECLARE
your_error EXCEPTION;
BEGIN
Raise your_error;
EXCEPTION
WHEN your_error
THEN
Do_Something;
END;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top