I am new to databases and programming. I'm not very good at computer jargon, so hold on to me. I have a csv
file that I am trying to upload to my Oracle
database. It contains account information such as name, phone number, service dates, etc. I installed Oracle 11g Release 2
. This is what I have done so far step by step.
1) Ran SQL Loader
I created a new table with the columns that I need. for instance
create table Billing ( TAP_ID char(10), ACCT_NUM char(10), MR_ID char(10), HOUSE_NUM char(10), STREET char(30), NAME char(50)
2) This prompted me that the table was created. Then I created a control file for the data in notepad, which was located in the same directory as my billing table, and has the extension .ctl. GIS.csv is an im file that receives data, and is also in the same directory and named it Billing.ctl, which looked like this.
load data infile GIS.csv into table Billing fields terminated by ',' (TAP_ID, ACCT_NUM, MR_ID, HOUSE_NUM, STREET, NAME)
3) Run sqlldr from the command line to use the control file
sqlldr myusername/mypassword Billing.ctl
This is where I am stuck. I saw video tutorials about what I am doing, but getting this error:
SQL*Loader-522: lfiopn failed for file (Billing.log)
Any ideas on what I can do wrong here?
Update
I just moved the files to a separate directory, and I believe that the previous error has passed. By the way, yes Billing.ctl and GIS.csv are in the same directory.
But now I have one more error:
'SQL*Loader-350: Syntax error at line 1.
Expecting the LOAD keyword, find "SERV TAP ID". "SERV TAP ID", "ACCT NUMBER", "MTR ID", "SERV HOUSE", "SERV STREET", "SERV ^ '
I do not understand why this is happening with this error. My billing.ctl has a load.
LOAD data infile GIS.csv into table Billing fields terminated by ',' (TAP_ID, ACCT_NUM, MTR_ID, SERV_HOUSE, SERV_STREET, SERV_TOWN, BIL_NAME, MTR_DATE_SET, BIL_PHONE, MTR_SIZE, BILL_CYCLE, MTR_RMT_ID)
Any thoughts?