Re: SQL*Loader
Date: 1996/09/04
Message-ID: <322E34BB.38AB_at_openmarket.com>#1/1
Liu Hui Ting wrote:
> I want to know if a data file contains data of LONG or ROW type, > can I still use SQL*LOADER to upload the file to database? If > yes, how I can specify the length in the control file? > liuht_at_scsxpo.scsnet.scs.com.sg
I just encountered this problem. It depends on your datafile. I present 2 different cases.
Case #1:
If the "long" data in the datafile spans multiple lines, then you
can use the continueif clause in the control file to specify the
end of "long" data.
Table definition:
(key_id number(8,0) not null,
prin_id integer,
pk_cert long null)
Control file:
Load Data
INFILE '/path_to_datafile'
insert
continueif NEXT(1) = "|"
into table tablename
(key_id position(0001:0001) decimal external, prin_id position(0003:0004), pk_cert position(0006:5000) char
)
Datafile: (There are only 2 records here)
1 23 -----BEGIN PRIVACY-ENHANCED MESSAGE-----
|Proc-Type:4,MIC-ONLY
|Content-Domain:RFC822
|Originator-Certificate:
| MDMSKFJKSJJOSKSKFKSJKFJSFS
| 884kjs01lk;02KJ3KJ4;JK-2kjkj;fjasfjsd-0100298348kjkfsl.x,xvjojf
| kjf;ajksfksdfl92jlkjwsk09oj32wesd90oi23wes
| ksjfslkf==
|
|cmvxdkjfksjdlfks==
|-----END PRIVACY-ENHANCED MESSAGE-----
2 12 -----BEGIN PRIVACY-ENHANCED MESSAGE-----
|Proc-Type:4,MIC-ONLY
|Content-Domain:RFC22
|Originator-Certificate:
| UN83kjksdjf0912k09fdkfajj21kljkfjsdfskjdfsf+kjksjfdsf
| 73jkKJ098234JJDSF0j1js098f3klk==
|
|CJKkjsdfjskflsfj==
|-----END PRIVACY-ENHANCED MESSAGE-----
Note that the | in the first position of the data will be
removed before being loaded into the table.
Case #2:
If the "long" data in the datafile does not span multiple lines,
then you can specify the length of the data in the control file
after the definition of the column.
Table definition:
(key_id number(8,0) not null,
prin_id integer,
pk_cert long null)
Control file:
Load Data
INFILE '/path_to_datafile'
insert
into table tablename
(key_id position(0001:0001) decimal external, prin_id position(0003:0004), pk_cert position(0006:5000) char
)
Datafile: (there are only 2 records here) 1 10 sjkdjksdjf;lskfj;lkjf;lieurojfsd09f809u23jkljf;kja;skfja;lsfj;skdjf 2 12 98098234kljdfp0a8u43ojk n 90fp023j4ljsdf09ui3l4jldjf 09u 3klj4;l
Hope this helps
Debi Jorge
jorge_at_openmarket.com
Received on Wed Sep 04 1996 - 00:00:00 CEST