Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Import .txt file into Oracle db?

777023Jun 3 2010 — edited Jun 3 2010
I am really new to Oracle...so please forgive my verbiage in trying to explain what I am trying to do.

I have a comma delimited text file that needs to be imported nightly to a table...(I will truncate it before I do the import)there is three columns in the text file and matching columns in the table.

I am using Oracle 11gR2 on Linux Redhat...

This is the script I think should work LoadTest.sql?


LOAD DATA
INFILE test.txt
INTO TABLE testuser.test1
REPLACE
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(
emp_id,
account_id,
account_nm
)


Do I just run this script from SQL Plus? ./LoadTest.sql

I'm currently working on a dev environment for me to test this on....
Thank you for all your help...
R/M
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2010
Added on Jun 3 2010
1 comment
2,546 views