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 -> Re: sqlldr Question

Re: sqlldr Question

From: Sunil <sunil_franklin_at_hotmail.com>
Date: Wed, 22 May 2002 14:10:06 +0530
Message-ID: <mUIG8.1$N24.10@news.oracle.com>


I ran into "ORA-04093 -- references to columns of type LONG are not allowed in triggers" as one of the columns in the tables is of datatype Long.

Any trick/workaround for this limitation ?

Thanks,
Sunil.

"Sunil" <sunil_franklin_at_hotmail.com> wrote in message news:sjFG8.25$sg6.15_at_news.oracle.com...
> Thanks to every one for your ideas !
> I am not on 9i so external tables is out ( sorry for not providing this
info
> earlier )
> Also I cannot truncate the table and reload as it will contain records
> entered by the user ( which has not come from the file )
> Right now I think I will go with Richard's approach. It looks like just
what
> I need, though I am bit concerned about the performance.
>
>
> Thanks,
> Sunil.
>
>
> "Richard Kuhler" <noone_at_nowhere.com> wrote in message
> news:D_wG8.1080$wj7.217475_at_twister.socal.rr.com...
> > I've used this trick before. Create a view for the target table with an
> > 'instead of insert' trigger on it. Have the trigger perform the
> > insert/update as necessary. Then just use the view as the target for
> > sql*ldr...
> >
> >
> > create table t (id number, val varchar2(30));
> >
> > create or replace view t_merge as select * from t;
> >
> > create or replace trigger trg_t_merge
> > instead of insert on t_merge
> > begin
> >
> > update t set
> > val = :new.val
> > where id = :new.id;
> >
> > if sql%rowcount = 0 then
> >
> > insert into t (
> > id,
> > val
> > ) values (
> > :new.id,
> > :new.val
> > );
> >
> > end if;
> >
> > end;
> >
> >
> > Richard
> >
> >
> >
> > Sunil wrote:
> > >
> > > I need to load some data into a table from a file.
> > > Later The file may undergo some changes and these changes will have to
> be
> > > reflected in the table. There is a pk column in the table (name) .
> > > How can I go about this.
> > >
> > > Thanks,
> > > Sunil.
> >
>
>
Received on Wed May 22 2002 - 03:40:06 CDT

Original text of this message

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