Skip to Main Content

SQL & PL/SQL

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!

SQL*Loader-350: Syntax error at line 5.

kiran_oracleJul 31 2013 — edited Jul 31 2013

Hi ,iam  new for  using  sql*loader, with minimum  understanding from  the forums,Iam  trying  to load data  from a flat  file (.dat) to oracle database.

here  is  my  .dat file-------> data_file.dat

aaaa, mumbai

bbbb,kolkat

here is  my  .ctl fle ------->ctrl_file.ctl

load data 

infile 'F:\oracle_utils_kiranorcl\KIR_ORA_DIR\emp_data.dat'

into table  test

fields terminated by  ","

( NAM  varchar2(12),

PLACE varchar2(8)

)

here  is  db_tab_name  structure 

create table test (nam Varchar2(15),place Varchar2(10));

SQL> select *  from  test;

NAM             PLACE

--------------- ----------

now.......

iam  running  the command on  cmd window on  os  level

F:\app\NANDAN\product\11.2.0\dbhome_1>sqlldr userid=kiranmai/kiranmai@kiranorcl control=F:\oracle_utils_kiranorcl\KIR_ORA_DIR\emp_data.ctl log=F:\oracle_utils_kiranorcl\KIR_ORA_DIR\emp_data.log bad=F:\oracle_utils_kiranorcl\KIR_ORA_DIR\emp_data.bad

when  i run this  above command ,I get  an  error,

SQL*Loader-350: Syntax error at line 5.

Expecting "," or ")", found "varchar2".

( NAM varchar2(12),

       ^

I  tried so many  times by creating  new ctl  files further. But  couldn't  able get  what  is  the  wrong  thing  ????

Please help me ..

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 28 2013
Added on Jul 31 2013
6 comments
1,729 views