TC72
asked on
Import CSV into SQL2008 using TSQL
Experts,
I have a need to import a csv file that has the first row as column names into a table in an SQL2008 database. This must be done through the use of TSQL. This table will contain over 100 columns. The destination table column datatypes are pretty varied.
This could be done with a dtsx package that is executed from TSQL however I am running into truncation validation issues with most of the datatypes of the columns.
Thanks in advance!
TC72
I have a need to import a csv file that has the first row as column names into a table in an SQL2008 database. This must be done through the use of TSQL. This table will contain over 100 columns. The destination table column datatypes are pretty varied.
This could be done with a dtsx package that is executed from TSQL however I am running into truncation validation issues with most of the datatypes of the columns.
Thanks in advance!
TC72
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This worked well after enabling 'Ad Hoc Queries' on the DB instance.