Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can loader insert nextval?
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
![]() |
![]() |