I have a 30 mb txt file with over 50000 rows that i'd like to insert into a brand new oracle table.
Can anyone tell me the simplest way to do this please?
Thanks for your reply. I followed your suggestion and built a .ctl file - but where do i put it? and how do i call it? Is there anything other than calling this .ctl file that needs to be done? is this something that i can do without admin privileges (i am not a DBA).
my .ctl file:
Load Data
infile 'c:\folder1\file1.txt'
fields terminated by "," optionally enclosed by '^'
into table TABLE1(ID,DT,EVENT_DESC,EVENT_AMT,EVENT_CAT)
yes, you can run from wintnt command window. go to your text file directory and try to execute the command. If the command is not recognized, then try to set the path the oracle folder. even if it doesn't work, copy your text file and ctl file to the oracle/bin directory and execute there.
My .ctl file looks like this and reports an "expecting INTO and got "fields terminated by.."
<
Load Data
infile 'bxvu0120020403-2C.txt'
APPEND
into table PPV_MASTERTEXT
(EVENT_ID,EVENT_DT,EVENT_DESC,EVENT_AMT,EVENT_CAT,e1,e2)
fields terminated by "," optionally enclosed by '^'
>
so i tried
<
Load Data
infile 'bxvu0120020403-2C.txt'
APPEND
into table PPV_MASTERTEXT
fields terminated by "," optionally enclosed by '^'
(EVENT_ID,EVENT_DT,EVENT_DESC,EVENT_AMT,EVENT_CAT,e1,e2)
>
.. and get "partial record found at eof - but this is misreporting because it still says this even if i rename the filename in the .ctl file to something that does not exist and run it ..
ca you tell me if the syntax looks correct please,
thanks!
My .ctl file looks like this and reports an "expecting INTO and got "fields terminated by.."
<
Load Data
infile 'file.txt'
APPEND
into table table1
(ID,DT,EVENT_DESC,EVENT_AMT,EVENT_CAT,e1,e2)
fields terminated by "," optionally enclosed by '^'
>
so i tried
<
Load Data
infile 'file1.txt'
APPEND
into table PPV_MASTERTEXT
fields terminated by "," optionally enclosed by '^'
(ID,DT,EVENT_DESC,EVENT_AMT,EVENT_CAT,e1,e2)
>
.. and get "partial record found at eof - but this is misreporting because it still says this even if i rename the filename in the .ctl file to something that does not exist and run it ..
ca you tell me if the syntax looks correct please,
thanks!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.