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!

Message Box Help

Status
Not open for further replies.

kilabru

Programmer
Oct 15, 2002
26
0
0
US
Is there a way to display a message that would say, "DEMOLISHED LOCATION" along with the return of a
null in the following code?

In other words, I want a message or dialog box to pop up that says it is DEMOLISHED.

Here is the code.

Create or Replace Trigger trigg_loc_stat
AFTER INSERT OR UPDATE
ON WORKORDER
FOR EACH ROW
REFERENCING NEW AS NEW OLD AS OLD
DECLARE
v_status locoper.status%TYPE;
BEGIN
select DECODE(b.status, 'DEMOLISHED', NULL, a.location)
INTO v_status
from locations a, locoper b
where a.location = b.location
and a.location = :NEW.LOCATION;
If v_status = 'DEMOLISHED'
THEN
:new.location := ' ';
END IF;
END;

Thanks,

JOHN
 
You may use dbms_output package to print your message, or , to be more precise, to pass it to your calling program. Though, in most cases you should care of displaying it in your calling program (if you're not in sql*plus) by yourself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top