6 Replies Latest reply: Jul 31, 2013 12:49 PM by Greg Spall RSS

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

    kiran_oracle

      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