Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> sql loader

sql loader

From: zris <zris_at_somewhere.com>
Date: 2000/04/12
Message-ID: <38f4e33b.603886883@news.earthlink.net>#1/1

I am trying to write a control file for a structure the following tables and am failing miserably, can someone help?

drop table a_table;
drop table b_table;
drop type a_type;

create or replace type a_type as object ( a_key int,
a_val int);
/

create table a_table of a_type (a_key primary key ) OBJECT IDENTIFIER IS PRIMARY KEY;
/

create table b_table (
a int,
a_key ref a_type scope is a_table);

a_table is loaded with the following inserts insert into a_table values (a_type(1,2)); insert into a_table values (a_type(2,2));

Control File.

######################################################################

LOAD DATA
INFILE *
into table b_table
append
FIELDS TERMINATED BY ',' TRAILING NULLCOLS (

        a char,
        a_filler filler char,
        a_key ref (constant a_table,a_key,a_filler)
)
BEGINDATA
2,1
2,1
2,2
Received on Wed Apr 12 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US