Subject Re: import from DBF to Firebird
Author radevojvodic
I suppose that you need to import DBF table into some kind of
temporary table into firebird first. This table should have same
strucure and then you could use select statement to insert just
records that are not already in your firebird table. You will have
to make join with not in clause or not exists clause to find which
records in a temp table are not in your firebird table already. How
familiar are you with SQL Select statement?

Rade.

--- In IBObjects@yahoogroups.com, "Jason Wharton" <jwharton@i...>
wrote:
> > I my DBF file is cca 1,500,000 records. First time I
> > need to import it in Firebird. Next time I need to
> > import diferent records. I mast compare one by one
> > record. This job I execute 1 time on day. How I
> > kann do this fastes? I use IBO and Delphi
> > 7. Thank's and sorry for my english. Franjo
>
> Write a stored procedure to receive each record from the DBF and
then with
> it prepared stuff in parameter values and execute over and over
for each
> record. Inside the stored procedure you will have the code that
reacts to
> each record as it comes. You can determine if the record is not
there and
> needs to be inserted of if it is there and needs to be updated.
The
> trickier part is how to determine which records should be
deleted. I
> suggest you feed them in a sorted order and simply issue a delete
for
> records between the last record's sorted key values such that only
records
> coming in remain. Let me know if you need more details on this
part.
>
> You could also use a fixed width text file and just declare it as
an
> external table and use it directly inside of firebird instead of a
stored
> procedure and then you may not even have to do the trouble of
importing and
> synchronizing.
>
> PS. Please use the public support forum for these kinds of support
requests.
>
> Jason Wharton