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
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