1

I have numerous different .csv files structured like so -

"Company", "column2", "column3"
"ABC Corp", "John Doe", "212,345"
"DBE Ltd", "Victor Smith", "234,345"

I understand how to write these CSV files to a table, however I want to actually write these to a new table but I may not know the columns so I need it to dynamically scan the .csv file to get the column names from the first row for the CREATE TABLE portion.

2
  • stackoverflow.com/a/3428633/650884 Commented Jun 8, 2014 at 0:57
  • I was going to reply but then it clicked. This link helped. I need to essentially read the first row as a separate array and pass each part of the array as a column in the table create command. I'm going to tinker with it now. Commented Jun 8, 2014 at 1:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.