BEGIN
  FOR l_rec IN (SELECT 1
                  FROM user_tables
                 WHERE table_name = 'EXT_DATAITEM_ROLES') LOOP
    EXECUTE IMMEDIATE 'DROP TABLE ext_dataitem_roles';
  END LOOP;
END;
/
create table ext_dataitem_roles
(
  field_name  varchar2(240),
  DESCRIPTION  varchar2(240),
  install  varchar2(240),
  std_install  varchar2(240),
  ofmat  varchar2(240),
  EXCHANGE  varchar2(240),
  std_exchange  varchar2(240),
  remove  varchar2(240),
  std_remove  varchar2(240),
  adversarial varchar2(240),
  alteration varchar2(240),
  capacity_change varchar2(240),
  addon varchar2(240),
  other varchar2(240),
  notes VARCHAR2(240),
  display_sequence NUMBER
   )  
   ORGANIZATION EXTERNAL
( type oracle_loader
default directory webmip_bulk_load
access parameters
( records delimited by NEWLINE
  READSIZE 10485760
  skip 1
  fields terminated by ',' 
  optionally enclosed BY '"'
  missing field values are null
  (
  field_name  ,
  DESCRIPTION  ,
  install  ,
  std_install  ,
  ofmat  ,
  EXCHANGE  ,
  std_exchange  ,
  remove  ,
  std_remove ,
  adversarial,
  alteration ,
  capacity_change ,
  addon ,
  other ,
  notes ,
  display_sequence
  )
)
location ('DATAITEM_ROLES.csv')
)
reject limit unlimited
/
