Storing a column name as a variable?

ets960

Registered User.
Local time
Today, 11:48
Joined
Jun 2, 2005
Messages
21
I am creating a database that compares different CSV's with the values in the database. It then updates the database depending upon the values in the CSV file.

Currently, there are 2 CSV's that we are comparing. I want to make the code more modular so that we can implement many more...

The problem is that there are multiple columns of item names that compare in the different csv's. For example, the columns are named "vendor_a_item_names" and "vendor_b_item_names". My visual basic script relates the records in the csv with the records in the "vendor_a_item_names" and "vendor_b_item_names".

I want to pass this value of header name as a variable. Like this "Current_name"... Then I can do something like FindFirst Current_Name_Value


Is there any way to do this? I can't think of a way...
 
You asked the same question in a different way in another post. Please dont' post the same question multiple times - especially if you're going to give varying amounts of details.

Your best solution would be to normalize the data. It is best to do it physically, but it is possible to do it with a union query. Then you can make your selections agains the union query rather than the table itself.
 

Users who are viewing this thread

Back
Top Bottom