Subject Re: [firebird-support] Import data from flat files
Author Milan Babuskov
Oleg Lebedev wrote:
> It worked, thanks.
> I guess it's a new feature, because I wasn't able to find it in the
> Language Reference guide.

Yes, it is.

> Still, I was able to import only about 90% of rows.

Probably some rows couldn't be converted becuse of bad formatting? Have
you tried doing select count(*) from external_table ?

How did you declare your external table? Can you post the DDL here,
please. I suggest that you use only char fields so that you can catch
conversion errors when doing INSERT INTO...

> I tried to enable the write-through cache, but now I can't drop my
> existing table, because it says that object ORDERS is in use. Does it
> always happen when write-through is enabled?

Not really. It sounds more like problem with uncommited transaction.
Before dropping the table always make sure you are the only user
connected, and that you have commited all transactions.

> After I restarted the FB server, ran
>
>>gfix -write sync
>
> and re-imported the data, I was still missing 10% of the rows. Maybe my
> file is messed up, but it worked for other databases.

Please post few lines from your file, and your external table DDL so we
have more detail to help you.

--
Milan Babuskov
http://fbexport.sourceforge.net