Home » Developer & Programmer » Forms » export from txt file to oracle table
export from txt file to oracle table [message #227217] |
Tue, 27 March 2007 09:57 |
progdoc
Messages: 9 Registered: January 2007 Location: Sr
|
Junior Member |
|
|
hi all
I want to read txt file and insert data to two tables
txt file is like this:
--this is start of txt file
doc=DOC
reg=if
id=1
dat=20.03.0711:47:38
vdat=25.03.07
par=12886
kd=K
obj=
mag=DCNS
np=V
rokp=
rab= 0.000
mar= 80.000000
tip=PDV18
ni=FCOKU
izj=
dpo=20.03.07
pl=T
sel=T
sek=
pro=
kom=MAKS
kas=
kasp= 0.000
rea=
isp=
chk=
avv= 0.000
avt=
voz=
km= 0
mp=N
begin
10010037 article1 114.000 36.440 5.000000000P18 27.180
10020038 article2 112.000 44.915 5.000000000P18 34.663
10020039 article3 115.000 40.680 5.000000000P18 29.817
10010041 article4 115.000 30.510 5.000000000P18 21.079
end
--this is end of txt file
Tables are like
create table dis_master
(
doc Varchar2(3) ,
reg Varchar2(60) ,
id Number(20) ,
dat Date ,
vdat Date ,
par Varchar2(60) ,
kd Varchar2(2) ,
obj Varchar2(80) ,
mag Varchar2(60) ,
np Varchar2(6) ,
rokp Number(20) ,
rab Number(5,3) ,
mar Number(18,6) ,
tip Varchar2(6) ,
ni Varchar2(6) ,
izj Varchar2(30) ,
dpo Date ,
pl Varchar2(2) ,
sel Varchar2(2) ,
sek Varchar2(20) ,
pro Varchar2(20) ,
kom Varchar2(60) ,
kas Varchar2(80) ,
kasp Number(5,3) ,
rea Varchar2(80) ,
isp Varchar2(80) ,
chk Varchar2(80) ,
avv Number(18,3) ,
avt Varchar2(100) ,
voz Varchar2(20) ,
km Number(9,3) ,
mp Varchar2(2)
);
create table dis_detail
(
reg Varchar2(60) ,
id Number(20) ,
idart Varchar2(15) ,
name Varchar2(30) ,
quantity Number(18,3) ,
price Number(18,3) ,
rab Number(18,9) ,
por Varchar2(5) ,
price1 Number(18,3)
);
detail data are between BEGIN - END
any suggestions are welcome
thanks
|
|
|
|
|
Goto Forum:
Current Time: Thu Dec 05 13:11:29 CST 2024
|