neglect the insert [message #485988] |
Sun, 12 December 2010 09:30 |
alaa_fouad2004
Messages: 64 Registered: January 2009
|
Member |
|
|
Dear all
thers is program insert lines in table called xx .
I create trigger on table xx before insert to validate values which will insert if this value not correct I want to negelct this insertion .
I want the command which I put in this trigger after this validation to neglect this insertion
CREATE OR REPLACE TRIGGER APPS.PROMOTION_TRIG
BEFORE INSERT
ON ONT.OE_ORDER_LINES_ALL
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
tmpVar NUMBER;
BEGIN
select count(*)
into tmpVar
from qp_pricing_attr_get_v gets, qp_qualifiers_v qual
where qual.LIST_HEADER_ID=gets.LIST_HEADER_ID
and qual.LIST_HEADER_ID=229557
and gets.PRODUCT_ATTR_VALUE=:new.INVENTORY_ITEM_ID
and qual.QUALIFIER_ATTR_VALUE=:new.SOLD_TO_ORG_ID
and exists
(
select 'x'
from oe_order_lines_all linn
where request_date between trunc(request_date,'MONTH') and last_day(request_date)
and linn.SOLD_TO_ORG_ID=qual.QUALIFIER_ATTR_VALUE
and linn.INVENTORY_ITEM_ID=gets.PRODUCT_ATTR_VALUE
) ;
if tmpVar>=1 then
neglect command ????????????????????????????????????
end if;
END ;
Alaa Fouad
[Updated on: Sun, 12 December 2010 09:37] Report message to a moderator
|
|
|
|
Re: neglect the insert [message #486208 is a reply to message #485992] |
Tue, 14 December 2010 05:04 |
alaa_fouad2004
Messages: 64 Registered: January 2009
|
Member |
|
|
HI THIS RAISE_APPLICATION_ERROR WILL STOP THE OTHER INSERTION LINES WHICH WANT TO CONTINUE TO INSERT IT .
I want to skip some lines without stop the insertion of other lines .
|
|
|
|