Link to home
Start Free TrialLog in
Avatar of TC72
TC72Flag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of Mohed Sharfi
Mohed Sharfi
Flag of Sudan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TC72

ASKER

Thank you for your quick reply!

This worked well after enabling 'Ad Hoc Queries' on the DB instance.