BEGIN
  FOR l_rec IN (SELECT 1
                  FROM user_tables
                 WHERE table_name = 'EXT_HOUSINGS') LOOP
    EXECUTE IMMEDIATE 'DROP TABLE ext_housings';
  END LOOP;
END;
/
create table ext_housings
(
  field_1  varchar2(240),
  field_2  varchar2(240),
  field_3  varchar2(240),
  field_4  varchar2(240),
  field_5  varchar2(240),
  field_6  varchar2(240),
  field_7  varchar2(240),
  field_8  varchar2(240),
  field_9  varchar2(240),
  field_10 varchar2(240),
  field_11 varchar2(240),
  field_12 varchar2(240),
  field_13 varchar2(240),
  field_14 varchar2(240),
  field_15 varchar2(240),
  field_16 varchar2(240),
  field_17 varchar2(240),
  field_18 varchar2(240),
  field_19 varchar2(240),
  field_20 varchar2(240),
  field_21 varchar2(240),
  field_22 varchar2(240),
  field_23 varchar2(240),
  field_24 varchar2(240),
  field_25 varchar2(240),
  field_26 varchar2(240),
  field_27 varchar2(240),
  field_28 varchar2(240),
  field_29 varchar2(240),
  field_30 varchar2(240),
  field_31 varchar2(240),
  field_32 varchar2(240),
  field_33 varchar2(240),
  field_34 varchar2(240),
  field_35 varchar2(240),
  field_36 varchar2(240),
  field_37 varchar2(240),
  field_38 varchar2(240),
  field_39 varchar2(240),
  field_40 varchar2(240)
   )  
   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_1,
  field_2,
  field_3,
  field_4,
  field_5,
  field_6,
  field_7,
  field_8,
  field_9,
  field_10,
  field_11,
  field_12,
  field_13,
  field_14,
  field_15,
  field_16,
  field_17,
  field_18,
  field_19,
  field_20,
  field_21,
  field_22,
  field_23,
  field_24,
  field_25,
  field_26,
  field_27,
  field_28,
  field_29,
  field_30,
  field_31,
  field_32,
  field_33,
  field_34,
  field_35,
  field_36,
  field_37,
  field_38,
  field_39,
  field_40
  )
)
location ('HOUSINGS.csv')
)
reject limit unlimited
/
