Home » RDBMS Server » Server Utilities » Loading table with subtypes from multiple files
Loading table with subtypes from multiple files [message #207017] Sun, 03 December 2006 22:31
tlahyani
Messages: 20
Registered: November 2006
Junior Member
Hi -

Consider the following types:

CREATE TYPE employee_type AS OBJECT
  (name     VARCHAR2(30),
   age      NUMBER(3),
   emp_id   NUMBER(5)) not final;

CREATE TYPE hourly_emp_type UNDER employee_type
  (wage     NUMBER(3));

CREATE TYPE salary_emp_type UNDER employee_type
  (salary   NUMBER(6));

CREATE TABLE employeeTab of employee_type;


If I have data for hourly employees in hour.dat and for salary employees in salary.dat, how would I load both of them into employeeTab??

This is the control file for loading data for the hourly emps:
LOAD DATA

   INFILE 'hour.dat'
   INTO TABLE employeeTab
   TREAT AS hourly_emp_type
   FIELDS TERMINATED BY ','
     (name     CHAR(30),
      age      INTEGER EXTERNAL(3),
      emp_id   INTEGER EXTERNAL(5),
      wage     INTEGER EXTERNAL(3))


Is it possible? How would I have to modify the control file? Thanks,
Previous Topic: how do I export an OPS$USER_ACCT as OWNER
Next Topic: Loading subtype with ref (ORA-22979)
Goto Forum:
  


Current Time: Wed Jul 03 09:48:55 CDT 2024