Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am importing data from excel(.xls) to SQL Server 2008 using SSIS. I have included IMEX=1 in the connection string of excel connection manager. But a column consists of a value as below:
4-Hour Engineer Dispatch ASPP Engr Dispatch 1: Up to 1 dispatch (8 hours) per year.  Hours exceeding allocation billed @ 1.5x hourly rate w/ 8-hr min Engr Dispatch:  8-hrs to arrive on-site from Ciena's determination of need  On-Site Engineer Dispatch - 8 Hour ASPP Engr Dispatch 8: Up to 8 dispatch (64 hours) per year.  Hours exceeding allocation billed @ 1.5x hourly rate w/ 8-hr min Engr Dispatch:  NBD to dispatch from Ciena's determination of need Per Incident On Site Support ASPP Engr Dispatch 12: Up to 12 dispatch (96 hours) per year.  Hours exceeding allocation billed @ 1.5x hourly rate w/ 8-hr min Engr Dispatch:  Next day to arrive on-site from Ciena's determination of need  Resident Engineer Engr Dispatch:  2-hrs to arrive on-site from Ciena's determination of need Engr Dispatch:  4-hrs to arrive on-site from Ciena's determination of need ASPP Engr Dispatch 2: Up to 2 dispatch (16 hours) per year.  Hours exceeding allocation billed @ 1.5x hourly rate w/ 8-hr min N

Actually there are about 600 rows in that Excel file. But the above mentioned value is present after 450 rows only. So, the datatype of that column is taken as nvarchar(255) as default instead of ntext and so I am getting error.

Anybody please help out... Thanks in advance...
Posted

1 solution

The answer you received in your Stack Overflow post (http://stackoverflow.com/questions/13452326/error-in-datatype-nvarchar-instead-of-ntext[^]) about SSIS sampling only the first 8 rows of the data is correct. You will need to take the advice of the poster and either increase the sample size or promote one of your records that has the longer set of data to the top.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900