Re: sqlldr-help(controlfile)
From: Eugenio <eugenio.spadafora_nospam_at_compaq.com>
Date: 2000/07/17
Message-ID: <8kv0kb$bod$1_at_mailint03.im.hou.compaq.com>#1/1
)
)
Date: 2000/07/17
Message-ID: <8kv0kb$bod$1_at_mailint03.im.hou.compaq.com>#1/1
Bob there are some problems with variable length field inside varray
(don't ask me why !! that was my first try with varray !!!)
This should work for you
load data
infile 'text.dat'
into table ae2
field terminated by '|'
(
err_id number(4),
name varchar2(30),
item_list varray terminated by '\n'
(
item_list column object ( err_name char(5000), oct1 char(5000) )
)
)
Probably you should delete the last | on the data lines.
-- Ciao Eugenio remove _nospam from reply address Opinions are mine and do not necessarily reflect those of my company ======================================================= Bob wrote in message <39729B0E.A7B39290_at_siemens.at>... >Hi, >I created this table: > > >SQL> desc ae2; > Name Null? Type > ------------------------------- -------- ---- > ERR_ID NUMBER(4) > NAME VARCHAR2(30) > ITEM_LIST COLUMN_OBJECT > >I created type Decription AS object( err_name varchar2(5000),oct1 >varchar2(5000)); >and >create type column_object varray(75000) of Description; >create table ae2 (err_id number(4),name varchar2(30), item_list >column_object); > >item_list : > err_name varchar2(5000), > oct1 varchar2(5000) > >I can only own row in table insert with this command: > >SQL> insert into ae2 >values(2,'ksdhfsdfh',column_object(item_list('lasdvh >skldhjkfsdlfamdjkh','lejwqhrlwerhewkhrj'))); > >1 row created. > >How can I insert into table with (control file); > >load data >infile 'text.dat' >into table ae2 >field terminated by '|' >( > err_id number(4), > name varchar2(30), > item_list filler char, > > > column_object > ( > item_list > > ( err_name varchar2(5000), > oct1 varchar2(5000) > ) > ) >) > >my be Syntax error!!! > >text.dat > >1 | Anna | dsaklöfjasjflkjaflsdjfskljfjs | sdöfjködfjdöfjdf | >2 | Jone | asdjfösdfjkösf090fadßafd | sdfofppdsf09ggf | > > >SQL*Loader: Release 8.1.5.0.0 - Production on Tue Jul 11 16:26:02 2000 > >(c) Copyright 1999 Oracle Corporation. All rights reserved. > >SQL*Loader-524: partial record found at end of datafile (ae2.ctl) > > >Thanks a lot in Advance. > >Bob > > >Received on Mon Jul 17 2000 - 00:00:00 CEST