here's my suggestion:
add a folder which contains all of your .csv files as a linked server.
a text linked server will show evert .txt file and every.csv file as a table...
so you can do something really simple like
SELECT *
INTO NEWTABLE
FROM TxtSvr...sample#csv
which would create the table on sql server with the same structure.
i think csv files assume the first row in the file is the name of the columns.
here's the syntax:
--===== Create a linked server to the drive and path you desire.
EXEC dbo.sp_AddLinkedServer TxtSvr,
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'C:\',
NULL,
'Text'
GO
--===== Set up login mappings.
EXEC dbo.sp_AddLinkedSrvLogin TxtSvr, FALSE, NULL, Admin, NULL
GO
--===== List the tables in the linked server which is really a list of
-- file names in the directory. Note that the "#" sign in the
-- Table_Name is where the period in the filename actually goes.
EXEC dbo.sp_Tables_Ex TxtSvr
GO
--===== Query one of the files by using a four-part name.
SELECT *
FROM TxtSvr...sample#csv
--===== Drop the text server
EXEC dbo.sp_DropServer 'TxtSvr', 'DropLogins'
GO
Lowell