Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Help, My trigger don't work

Help, My trigger don't work

From: Mark Hanson <markhan_at_ma.ultranet.com>
Date: 1997/05/28
Message-ID: <01bc6b07$7f4e1ce0$LocalHost@default>#1/1

I am a rookie, I am taking a class at Clark University. Can anyone tell me why this trigger wont
work?

I am using:

Oracle7 Server Release 7.3.2.1.1 - 60 day trial license With the distributed and replication options PL/SQL Release 2.3.2.0.0 - Production

I get this error message:

Warning: Trigger created with compilation errors.



create or replace trigger update_days_to_pay_trigger after insert on cash_application_table
for each row

declare
days_to number;

begin

select p.dep_date - i.inv_date into days_to from invoice_table i, payment_table p, :new c where i.inv_number = c.apply_to
and c.csh_num = p.csh_num

and i.inv_number = :new.apply_to;                    -- Do I need this, it
seems redundant ? -----

update invoice_table
set days_to_pay = days_to
where inv_number = :new.apply_to;

end;



create or replace procedure update_days_to_pay (in_num number)is

days_to number(3);

begin

select p.dep_date - i.inv_date into days_to from invoice_table i, payment_table p, cash_application_table c where i.inv_number = c.apply_to
and c.csh_num = p.csh_num
and i.inv_number = in_num;

update invoice_table
set days_to_pay = days_to
where inv_number = in_num;

end;

Another question, can I assigne a default value to a column in a view? Assigning a default value to the table won't work because it is used in a calculation in an outer join. I get value - null = null for the outer part of the join. Received on Wed May 28 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US