0

I want to insert data from .csv file to my table. Can I do it with organization external and oracle_loader or do I need to do something else?

SQL>       create table teachers_ext (
      2        first_name     varchar2(15),
      3        last_name      varchar2(15),
      4        phone_number   varchar2(12)
      5      )
      6      organization external (
      7        type oracle_loader
      8        default directory ext_data_files
      9        access parameters (
     10         fields terminated by ',')
     11       location ('teacher.csv')
     12     )
     13     reject limit unlimited;
  • As in http://www.orafaq.com/node/848 ? – Caius Jard Oct 24 '18 at 16:56
  • If you're using PL/SQL Developer, the best way is to use the "Text Importer" tool. – Diego Souza Oct 24 '18 at 16:56
  • I today only uploaded csv file to oracle table Using **SQL LOADER** in Oracle to import CSV file. Check out this [link](http://steve-lyon.blogspot.com/2013/07/sql-loader-step-by-step-basics-example-1.html) – jackkds7 Oct 24 '18 at 16:57
  • 1
    *"Can i do it with organization external and oracle_loader "* Yes and yes. So what happens when you create your external table and then select from it? – APC Oct 24 '18 at 18:59

1 Answers1

0

Yes, that is the best way to do it. But I suppose that if you are asking is because it doesn´t work.

May be is a permission problem (you can´t use ext_data_files directory for example).

Do you get an error when you try to create your external table?

Do you get an error when you try SELECT from it?

santiagop
  • 66
  • 3