• 0

PL/SQL help - Trigger/Appilcation Errors


Question

I am trying to create a trigger that raises an application error when an update is done to a specific field in a table, but I am consistently getting an error message that says there are compilation errors. My code:

Create or replace trigger MaxBudget
Before insert or update of Budget on Project for each row
Begin
	If (:new.Budget) > 100000000 then
		raise_application_error(-20101, ?Budget too large.?);
	End If;
End;
/

And the error message I get states:

3/3	   PL/SQL: Statement ignored
3/36	 PLS-00201: Identifier 'Budget too large.' must be declared

I guess I'm confused as to why I'm getting this error?

FTR, if I try to use single quotes which I have seen as very common in examples, I get another error that says it's expecting a double-quoted delimited-identifier.

Any tips would be greatly appreciated!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Update - It was the single quotes; I was typing in Word, because my professor wants us to submit a Word doc with all of this information; I should have known better about the stupid formatting that MS Word does!

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.