2 Replies Latest reply: Nov 20, 2012 9:18 PM by 951599 RSS

    need help on setting for external table

    951599
      HI

      Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
      PL/SQL Release 10.2.0.1.0 - Production
      CORE 10.2.0.1.0 Production
      TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
      NLSRTL Version 10.2.0.1.0 - Production

      I am new in external table so i have tried following cmd.

      create directory dir_1 as 'E:\ora_dirt' ;

      grant read, write on directory dir_1 to HR;

      select * from all_directories;

      create table emp_ext
      (emp_id number,
      emp_name varchar2(30)
      )
      organization external
      (
      type oracle_loader
      default directory DIR_1
      access parameters
      (
      fields terminated by ','
      ( id , name)
      )
      location ('emp.dat')
      )
      reject limit unlimited;

      select * from emp_ext

      since I am not able to see DIR_1 in E:\ drive due to which i havnt created  'emp.dat' file and on executing select on external table i m geting expected error
      *"ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-04043: table column not found in external source: EMP_ID"*

      please tell me how to create that file in directory "DIR_1" .

      thanks