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: SQL*Loader for loading multiple records

Re: SQL*Loader for loading multiple records

From: kbatsche <kbatsche_at_yahoo.com>
Date: Wed, 23 Jun 1999 20:38:20 -0700
Message-ID: <qJhc3.1299$3C3.46466@news.uswest.net>


You could try -
importing the file as is
create an empty table (new_table) that has the fields and column attributes that you require
then set up multiple append queries like

append
select col1, col2, col3, col4, col5_1 as col5, col6_1 as col6 from tablename
to new_table

select col1, col2, col3, col4, col5_2 as col5, col6_2 as col6 from tablename
to new_table

select col1, col2, col3, col4, col5_3 as col5, col6_3 as col6 from tablename
etc...
then drop the original table

(believe it or not the idea for this came from a SAS script on MVS that I just wrote)

jairamk_at_geocities.com wrote in message <7krdc4$ge4$1_at_nnrp1.deja.com>...
>Hi! Everyone!
> I have to load to a flatfile with the following format
><Header Fields> <Repeating group>.......
>ie
>col1|col2|col3|col4|col5_1|col5_2|...|col5_n|col6_1|col6_2|...|col6_n
>
>into a table of having the format
>
>(col1,col2,col3,col4,col5,col6)
>
>so essentially one physical record in the file will translate into
>n logical database records... the problem is how do i specify field
>positions in the control file... The examples show how to do it to fixed
>length format files but not with delimited files...
>i am at my wits end with this...
>any help will be great...
>thanx in advance
>jairam
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Wed Jun 23 1999 - 22:38:20 CDT

Original text of this message

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