0
CREATE TABLE SKILL_LEVEL_DIM_X 
(
    SKILL_LEVEL_ID INTEGER
    ,SKILL_LEVEL_NAME VARCHAR(50)
    ,SKILL_LEVEL_DESCRIPTION VARCHAR(500)
--  ,CRE_DTTM DATE NOT NULL DEFAULT SYSDATE
--  ,UPD_DTTM DATE NOT NULL DEFAULT SYSDATE
)
ORGANIZATION EXTERNAL 
(
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY ABC_DB_SKILLS
    ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        SKIP 1
        FIELDS TERMINATED BY ','
        LRTRIM
        MISSING FIELD VALUES ARE NULL
        REJECT ROWS WITH ALL NULL
        FIELDS  (
    SKILL_LEVEL_ID INTEGER
    ,SKILL_LEVEL_NAME CHAR(50)
    ,SKILL_LEVEL_DESCRIPTION CHAR(500)    
        )
    )
    LOCATION ('SKILL_LEVEL_DIM.csv')
);

I created an external table in Oracle SQL to pull data from a .csv file. After I create the staging table and query from it, SKILL_LEVEL_ID is '1' in the .csv file to '1094855729' in the external table and 'BASIC' in the.csv file to 'SIC' in the external table.

csv file

export

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
ddaya11
  • 3
  • 1
  • The csv file given in this question, is this the original csv file i.e only 3 records or does the actual file has more data? – Pankaj Apr 14 '22 at 04:04

1 Answers1

0

when you use INTEGER, it means the data is in binary format, not numeric characters like you have. Use CHAR and see what it gives. And for the column description, use VARCHAR2 and not VARCHAR.

gsalem
  • 1,957
  • 1
  • 8
  • 7