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: importing to oracle using sql*loader question

Re: importing to oracle using sql*loader question

From: Suresh Bhat <suresh.bhat_at_mitchell-energy.com>
Date: Tue, 06 Jul 1999 17:04:31 GMT
Message-ID: <01bec7e2$40cbffc0$a504fa80@mndnet>


Hi -

Here is a sample that you can modify and use. Will work for fixed width column records only.
The numbers in the parentheses are the column numbers in your record that you want to put into the columns in your table.

For example columns 2 through 11 will be put into column station of table table1 owned by ops$xyz.

Other variable names are self explanatory.

For your date you should use format: yyyy-mm-dd

This should give you a start. This is a very simple control file. You have many more options to use in SQL*Loader.



load data
infile faalarm.txt
append
into table ops$xyz.table1
       (
        station                 position(  2: 11),
        alarm_date          position( 21: 39) date 'mm/dd/rr   hh24:mi:ss',
        code                   position( 42: 44),
        point_code          position( 46: 46),
        create_date         sysdate               )

Suresh Bhat
Oracleguru
www.oracleguru.net
oracleguru_at_mailcity.com

mark <mark_at_cybertrails.com> wrote in article <37821E96.BDF41CD4_at_cybertrails.com>...
> does anyone know where i could find an example of a working control file
> for sql*loader?
>
> here is what im trying to do.... i have this file... each record is one
> line
> the records have 6 parts
> last name, first name, date, the plus sign which needs to be ignored,
> amount, and employee id #
> the record has fixed width columns and the date must be converted to an
> oracle date field.
>
> ABBATE ADRIAN 1999-05-28+00000084899734
> ABBATE ADRIAN 1999-06-15+00000084899734
> ABBATE ADRIAN 1999-06-30+00000084899734
> ABDALLAH HANNA ESSA 1999-05-28+00000103500800
> ABDALLAH HANNA ESSA 1999-06-15+00000103500800
> ABDALLAH HANNA ESSA 1999-06-30+00000103500800
> AGRAWAL BAJARANG 1999-05-28+00000084801125
>
>
> All help is Appreciated!
>
> Thanks
> Mark Wagner
> new DBA
> mark_at_cybertrails.com
>
>
>
Received on Tue Jul 06 1999 - 12:04:31 CDT

Original text of this message

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