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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL Loader Load Problem

RE: SQL Loader Load Problem

From: Ken Janusz <ken.janusz_at_sufsys.com>
Date: Wed, 19 Dec 2001 05:43:23 -0800
Message-ID: <F001.003DFEAA.20011219052019@fatcity.com>

Kirti:

Another person recommended this approach and it worked very nicely. To bad it's not in the book.

Thanks much,

Ken

 -----Original Message-----
Sent: Tuesday, December 18, 2001 10:20 PM

To:     Multiple recipients of list ORACLE-L
Subject:        RE: SQL Loader Load Problem

Ken,
 If you are using 8i, then you can use the 'filler' fields.  In this case the control file would look something like below(considering the fields are terminated by a comma and the table has columns a, b and c)

 load data
   infile 'myfile'
   into table mytable
   fields terminated by ','
 (a char,
  b char,

  f3 filler char, 
  f4 filler char, 
  f5 filler char, 
  f6 filler char, 

  ....
  f42 filler char,
  c char
 )

If you are not using 8i, then you can not avoid an intermediate table, or use OS level tools to chop off the unwanted fields.

HTH,

-----Original Message-----
Sent: Tuesday, December 18, 2001 4:15 PM To: Multiple recipients of list ORACLE-L

I have an input file that is delimited and contains 43 fields of various widths. I need to load only 3 fields into a DB table of 3 columns. 2 of the fields are at the beginning of the record and 1 is the very last field in the record. How can I load only these 3 cols and ignore the other 40 cols I don't need without having to use an intermediate table?

Thanks,
Ken Janusz, CPIM
Database Conversion Lead
Sufficient System, Inc.
Minneapolis, MN

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Ken Janusz
  INET: ken.janusz_at_sufsys.com

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Deshpande, Kirti
  INET: kirti.deshpande_at_verizon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Ken Janusz
  INET: ken.janusz_at_sufsys.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Dec 19 2001 - 07:43:23 CST

Original text of this message

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