Re: SQLLDR
Date: 1995/10/25
Message-ID: <46m4br$kce_at_inet-nntp-gw-1.us.oracle.com>#1/1
Brit.Willoughby_at_WichitaKS.ATTGIS.Com (Brit Willoughby) wrote:
If you don't have a requirement to do direct path loads, then the following will work:
load data
infile *
append into table MyData
fields terminated by ',' optionally enclosed by '"'
(Field1 "substr(:field1,1,10)", Field2 "substr(:field2,1,10)", Field3 "substr(:field3,1,10)" )
begindata
"Some Data","This Data2 is too long!","Some Data" "My Data","This Data is too long too!","Data" "Data","Ok Data","Nice Data"
You can apply any SQL or even PL/SQL routine to incoming data via this method.
> Lets say I have the following load.ctl file:
>load data
>infile 'MyData.DAT'
>append into table MyTable
>fields termilated by ',' optionally enclosed in '"'
>(Field1,Field2,Field3)
> The Field widths are 10,10,10, respectivly of char.
>"Some Data","This Data2 is too long!","Some Data"
>"My Data","This Data is too long too!","Data"
>"Data","Ok Data","Nice Data"
> How can I truncate the 2ed piece of data to ensure that is is only
>10 long and will fit in Field2?
> I can't figure out how to use the Position statement because the
>positions vary from line to line.
>
> Any help will be... helpful! :)
> Brit willoughby
> Brit.Willoughby_at_WICHITAKS.ATTGIS.COM
> Brit Willoughby
> Brit.Willoughby_at_WichitaKS.ATTGIS.Com
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Received on Wed Oct 25 1995 - 00:00:00 CET