Subject | Re: import from DBF to Firebird |
---|---|
Author | radevojvodic |
Post date | 2005-03-10T09:59:49Z |
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:
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 Ithen with
> > 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
> it prepared stuff in parameter values and execute over and overfor each
> record. Inside the stored procedure you will have the code thatreacts to
> each record as it comes. You can determine if the record is notthere 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 bedeleted. I
> suggest you feed them in a sorted order and simply issue a deletefor
> records between the last record's sorted key values such that onlyrecords
> coming in remain. Let me know if you need more details on thispart.
>an
> You could also use a fixed width text file and just declare it as
> external table and use it directly inside of firebird instead of astored
> procedure and then you may not even have to do the trouble ofimporting and
> synchronizing.requests.
>
> PS. Please use the public support forum for these kinds of support
>
> Jason Wharton