sql*Loader & DB trigger problem.
From: <engsys_at_merlion.singnet.com.sg>
Date: 1997/02/21
Message-ID: <5ej28p$7o9_at_lantana.singnet.com.sg>#1/1
Date: 1997/02/21
Message-ID: <5ej28p$7o9_at_lantana.singnet.com.sg>#1/1
Hello there,
Let me explain my problem,
[Quoted] [Quoted] I have a table which i am loading from a flat file.
there is a field to be populated based on the values of another field
being loaded. i thought i can use db trigger.
so i have created a trigger
create or replace trigger load_tab before insert on my_table
for each row
begin
if old.field1 = 'VALUE1' THEN
new.field2 := 'ONEVALUE';
else
new.field2 := 'OTHERS';
end if;
end;
but unfortunately, i see the field2 always has OTHERS, irrespective of field1. Can someone help me as where I am doing the mistake.
Thanks in advance.
with regards,
prasad.
Received on Fri Feb 21 1997 - 00:00:00 CET