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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question

Re: Newbie question

From: David Staempfli <david.staempfli_at_swisscom.com>
Date: 1998/03/25
Message-ID: <351920D2.29F620E5@swisscom.com>#1/1

try the sqlload, next an example.

you need 3 files :

test.dat

1,00001,000000006610,18-06-1996,2,1,00000,00000
1,00001,000000006611,18-06-1996,2,1,00000,00000
1,00001,000000001578,18-06-1996,2,1,00000,00000
1,00001,000000004734,18-06-1996,2,1,00000,00000

test
#Script für test_load
sqlload USERID=name/pwd CONTROL=test.ctl LOG=../log/test.log

test.ctl
-- Loadfile für test
LOAD DATA
INFILE '/test.dat'
BADFILE '/test.bad'
DISCARDFILE 'test.dsc'
INSERT
INTO TABLE test_table
WHEN tre_cakt != '0'
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'                (tre_cakt,tre_anbid,tre_refid,tre_beginn DATE "DD-MM-YYYY",

                tre_typ,tre_anwart,tre_pixelh,tre_pixelb)


David

Martin McGreal wrote:

> I have my first table setup and a large ascii file of data converted
> to
> the sql insert command:
>
> insert into table values (...); etc.
>
> My question is how do I convert this ascii file to sql and then bring
> it
> into sql plus to start it moving?
>
> I started off cutting and pasting but I have too much data for this
> approach
> as the buffer can only take so much data per cut and paste.
>
> I am using notepad and was aware of the little trick of using the
> "edit"
> command to call it up. (I had to learn this one too! ;)
>
> thanks,
>
> --
> Martin McGreal
Received on Wed Mar 25 1998 - 00:00:00 CST

Original text of this message

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