• You'll need to read the first line of the file (easiest way is a script task), get the individual column names and create a dynamic CREATE TABLE statement using those columns. The easiest method is to give every column a fixed data type, such as varchar(250) NULL.

    After the table is created, you can use bcp or BULK INSERT to import the flat file into the table.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP