Import using CSV based on a header or the file.

abhishek.shah

New Member
Hi,
How do I import from a csv into my database fields dynamically?
Since the order of the columns keep changing from the client how do I handle which column goes in which database field.
I need to be able to decide based on the header of the columns which do not change. Can it be done?
I am using OpenEdge Release 10.1B03.
Thanks.
 

Cringer

ProgressTalk.com Moderator
Staff member
Yes it's possible. You have to use dynamic queries, temp tables etc. I have written something similar to what you want but I can't share it as it is owned by the company I work for, and it is quite big and contains business information I am not allowed to divulge.

Essentially though the process is to create a dynamic temp table and use the column headings to name the fields in the temp table. Then you create a dynamic query on the temp table to go through the records and assign them to your database as you need them.
 
Top