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: Can loader insert nextval?

Re: Can loader insert nextval?

From: Eric Lyders-Gustafson <ericlg_at_homemail.com>
Date: Tue, 19 May 1998 12:39:36 -0500
Message-ID: <3561C3D7.70CC11F0@homemail.com>


Try creating a function that accepts a varchar2 and returns the nextval of a sequence if the varchar2 passed is null or blanks, or just passes back the varchar2 if it's not null or blanks. Then in the *.ctl file use this:

load data
append
into TABLE <table_name>
(
...
COL position(1:10) -- position of column in data file

                "get_col(:col)", -- function that returns value
...
)

I've never used it like this, so tell me if it works. -Eric

Steve Haynes wrote:

> Hi All,
>
> RE: Oracle 7.3.3 and/or 8.0.4.
>
> Can loader do the following?:
>
> if col is null or blanks then
> insert my_seq.nextval
> else
> insert original col value
> endif
>
> Thanks.
> Steve
> P.S
> I don't want the loader built in sequences...
>
> --
> "The floggings will continue until morale improves."
Received on Tue May 19 1998 - 12:39:36 CDT

Original text of this message

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