Subject Re: [IBO] Ib_import for relational tables?
Author Helen Borrie
At 07:34 PM 9/02/2005 +0000, you wrote:

>My app has to import a CSV file that contains data from several
>tables of a relational db. At the moment i use components that allow
>me to do this by setting mappings such as:
>where fields 1 and 2 correspond to one table in the db and fields 3
>and 4 correspond to a different table.
>Can Ib_import be used in the same way? From the import.pas file it
>seems to suggest a simple list of fields like:
>Any ideas?

I suggest importing the CSV file into a table that defines all fields with
all char() and varchar() fields of suitable length. Write an executable
SP, with all of these char fields as input, that loops through and sorts
out which fields are to go to each destination. Do any casting and
substringing required right inside the procedure and use custom exceptions
to catch bad data and write a log.