Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 19-Nov-12 1:14am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 324
1 Sergey Alexandrovich Kryukov 182
2 Maciej Los 159
3 Hard_Rockz 143
4 Richard MacCutchan 125
0 OriginalGriff 5,374
1 Sergey Alexandrovich Kryukov 4,713
2 Peter Leow 2,944
3 DamithSL 2,465
4 Maciej Los 2,270


Advertise | Privacy | Mobile
Web02 | 2.8.140718.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid