Re: SQL*Loader query
Date: Wed, 28 Mar 2001 21:28:25 -0800
Message-ID: <tc5hna3pjbpg70_at_corp.supernews.com>
"nick" <nick_at_notgiven.com> wrote in message
news:99s8qg$1m8$2_at_newsreaderm1.core.theplanet.net...
> Hi,
>
> I'm trying to use SQL*Loader to load some data into a table,
> say employee, but one of the data fields is in another table,
> say dept e.g.
>
> Table employee:
> empno ename deptno
> ----------------------
> 1 bob 3
> 2 tom 1
>
> Table dept:
> deptno dname
> --------------
> 1 dev
> 2 mis
> 3 hr
>
> The data I have to load into employee is like
> 1 bob hr
>
> so somehow when I see the "hr" I need to look it up in dept and
> actually insert "3" for deptno.
>
> Is there any way to do this sort of thing?
>
> Thanks in advance.
> Nick
SQL*Loader isn't designed for that sort of thing.
You can create a trigger on the table you're inserting into that gets the information and then drop the trigger when you are done.
-Matt Received on Thu Mar 29 2001 - 07:28:25 CEST