Subject Re: [firebird-support] External Files
Author Wolfgang Rohdewald
On Monday 30 October 2006 18:39, niegil_firebirddev wrote:
> Can anyone pls explain me the use of external file in firebird
> . If possible with a example or so.

just done today for importing data: (written with Delphi
from paradox files into MW.txt)

create table MW (
MW_ID d_mw_id not null,
Code char(1) not null,
Satz d_rabatt not null,
Deutsch char(30) not null,
Franzoesisch char(30) not null,
Italienisch char(30) not null,
Englisch char(30) not null,
Alt d_boolean not null );

create table IMW external file '/tmp/MW.txt' (
MW_ID id_mw_id not null,
Code char(1) not null,
Satz id_rabatt not null,
Deutsch char(30) not null,
Franzoesisch char(30) not null,
Italienisch char(30) not null,
Englisch char(30) not null,
Alt id_boolean not null,
newline char(2) );

insert into mw select
mw_id,code,satz,deutsch,franzoesisch,italienisch,englisch,alt from imw;

alter table MW
add constraint pk_mw primary key(MW_ID);

and the first 2 lines of mw.txt:

1 7.6Inklusive 7.6 % MWST 7.6 % TVA inclue F
2* 2.4Inklusive 2.4 % MWST 2.4 % TVA inclue F


--
Wolfgang