title: Import csv file into SQL Server temptable, without specifying columns
body: <p>I am currently trying to manipulate a fairly poor csv file into an SQL database. I would prefer to not use another program to amend the csv file. it's an output from a locked program, and the business have a general understanding of SQL, which is why I prefer an SQL solution.</p>
  <p>What I want to do is take the 60 columns from this csv and import them all into a table, without specifying the column names. I have seen this BULK INSERT which allows me to put them into a table, but only one that's already created.</p>
  <p>My actual end goal is to transform the data in the CSV so I have a table with just five columns, but step one is to get all of the data in, so that I can then grab the information that's relevant.</p>
  <p>MY CSV file has a header row, but 59 of the 60 headers are blank, so there are no actual column headers in the sheet.</p>
  <p>Example
  SHEET,,,,
  Data1, Data2, Data3, Data4, Data5,</p>
  <p>Even better, if i could grab the columns I need (which in my case are columns 7, 31, 55 and 59) that would be even better.</p>
  <p>I've scoured the internet and can't find the exact solution i'm looking for.</p>
  <p>I've also tried to use SSIS for this, but honestly I find it unreliable sometimes and slight changes seem to break everything, so I gave up!! (My idea was flat file import &gt; Derived Column &gt; data conversion &gt; OLE DB destination, but I got errors with the flat file import, which I can't seem to solve.</p>
  <p>I would prefer to do it all through one SQL script if I can anyway, but any suggestions of the best way to achieve this are welcome.</p>
  <p>Thank you,
  Craig</p>