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.

whoisearth
  • 4,080
  • 13
  • 62
  • 130
  • http://stackoverflow.com/a/3428633/650884 – Pavel Jun 08 '14 at 00: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. – whoisearth Jun 08 '14 at 01:30

0 Answers0