PL/SQL (MOSC)

MOSC Banner

Loading data from csv file into table - problem

edited Jul 30, 2013 3:59AM in PL/SQL (MOSC) 3 commentsAnswered ✓
 Hello, 
I have Windows 7 64 bit, Oracle 11.2.0 and I use SQL Developer 3.0.0.4. I have a CSV file with data like this:

0000000000|000000000000000000000|000000000000000000000000000
00000000|0000000000000000000000000|00000000000000000000000000
00000000|000000000000000000000000|000000000000000000000000

As you see - numbers are seperated by "|"

I want to create a table in which I will enter this data, so:


create table acc_tmp
(row_id VARCHAR2(20),
 X_NUMBER NUMBER(30),
 X_VIRTUAL_NUMBER VARCHAR2(100)
)
ORGANIZATION EXTERNAL
  TYPE oracle_loader
  default directory data_dir
  access parameters
  ( 
  records delimited by newline
  fields terminated by '|'
  )
  location ('XXXXXXXXX_Numbers_PROD_2013_07_29.csv')
)

When I run it I ahve an information that: 

"table ACC_TMP created"

But, when I want to query:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center