in which trigger I should use this: [message #193175] |
Fri, 15 September 2006 03:00 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
I have 2 table
both table have a same field "Quantity".
I am unsing this formula pla help me in where and in which trigger I should use this:
*************************
declare
pos number;
rcs NUMBER;
tot number;
begin
select sum(quantity) into pos from subpogeneral where subpogeneral.item_code=:subrcgeneral.item_code;
select sum(quantity) into rcs from subrcgeneral where subrcgeneral.item_code=:subrcgeneral.item_code;
--tot := pos-rcs;
if pos >500 then
--< rcs then
--M:= SHOW_ALERT ('MSG');
message('P.O Quantity is less then RC Quantity! ');
message(' ');
raise form_trigger_failure;
end if;
end;
|
|
|
Re: in which trigger I should use this: [message #193179 is a reply to message #193175] |
Fri, 15 September 2006 03:11 |
Liza79
Messages: 74 Registered: September 2006
|
Member |
|
|
seems to me some kind of validation, but intill i don't know the actual purpose of this formula, why did you write it and when do you want this check to be performed. I cann't suggest you.
It must be in WEHN-VALIDATE-OBJECT trigger, but which one, i cann't tell you unless you tell me what i asked?
Liza
|
|
|
|
|
|
|
|