Re: importing ascii into oracle tb

From: Suresh Bhat <suresh.bhat_at_mitchell-energy.com>
Date: Tue, 06 Jul 1999 21:25:34 GMT
Message-ID: <01bec806$b405f1c0$a504fa80_at_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

Timothy Bowen <tim2ann_at_gis.net> wrote in article <vVng3.1973$_b.969504_at_WReNphoon3>...
> Is there a quick & dirty way to import an ascii text file into an oracle
> table. Or do I need a special tool for that?
> Thanks.
>
>
>
> -**** Posted from RemarQ, http://www.remarq.com/?c ****-
> Search and Read Usenet Discussions in your Browser
>
Received on Tue Jul 06 1999 - 23:25:34 CEST

Original text of this message