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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*Loader - How do I use a field from a source file that has no column in the table?

Re: SQL*Loader - How do I use a field from a source file that has no column in the table?

From: Ranga Chakravarthi <ranga_at_cfl.rr.com>
Date: Thu, 06 Sep 2001 03:25:21 GMT
Message-ID: <B0Cl7.39063$aZ.10962921@typhoon.tampabay.rr.com>


Filler fields can be specified in NULLIF or WHEN not in SQL strings.

"Don" <dchamber_at_mindspring.com> wrote in message news:ceedpto860e00bt3sv3613hr043mqoi2f6_at_4ax.com...
> I'm using SQL*Loader to load a table and I have the following
> situation.
> The table is as follows:
> -------------------------------
> pk_id Primary Key
> fk_id Foreign Key
> code VARCHAR2(10)
> ------------------------------
> And the source file is as follows:
> val1,val2,theCode
>
> The value for pk_id is entered with a trigger but fk_id is a foreign
> key that I must lookup in another table. I have a stored function
> that will look up this value given val1 and val2 from the source file.
> How do I do this?
>
> I have tried the following in the control file:
> val1 FILLER CHARACTER,
> fk_id getID(:val1,fk_id),
> code CHARACTER
>
> But this fails because val1 is not bound. Is i remove the : from val1
> I get an error that the column does not exists. I have a similar load
> in which the fk_id uses a function that only takes 1 argument. This
> works fine.
>
> How do I use a field from the source file that has no corresponding
> column in the table.
>
> Thanks,
> Don
> dchamber_at_mindspring.com
>
>
Received on Wed Sep 05 2001 - 22:25:21 CDT

Original text of this message

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