July 29, 2013 at 12:46 pm
Hello all,
I'm attempting to import a text delimited file with a few fields that have greater than 8k characters. I'm running into this error on import, "Text was truncated or one or more characters had no match in the target code page.". So, how do I get around this? I've attempted to import those columns as text, varchar(8000), and varchar (max) with no luck so far. I'm hoping that I don't have to split those fields into multiple rows if they are larger than 8k characters.
July 29, 2013 at 12:51 pm
NM guys, I got it to work. The import feature is just touchy.
July 29, 2013 at 1:45 pm
JoshDBGuy (7/29/2013)
NM guys, I got it to work. The import feature is just touchy.
If you thought the flat file import is touchy, you should try the Excel one... 🙂
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
July 31, 2013 at 10:09 am
Hi. We get the same error. The excel import works fine, but what causes the error for the flat file CSV import, and how did you overcome the problem? The character type is STRING (50) and none of our string lengths are more than 35. Thanks!
July 31, 2013 at 1:42 pm
nealz (7/31/2013)
Hi. We get the same error. The excel import works fine, but what causes the error for the flat file CSV import, and how did you overcome the problem? The character type is STRING (50) and none of our string lengths are more than 35. Thanks!
What is the exact error that you get?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
July 31, 2013 at 1:57 pm
USING SSMS / Tasks / Import Data
- Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "FIN_ACCI_TITLE" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)
Error 0xc020902a: Data Flow Task 1: The "output column "FIN_ACCI_TITLE" (42)" failed because truncation occurred, and the truncation row disposition on "output column "FIN_ACCI_TITLE" (42)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)
Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "\\fdns10.msu.montana.edu\ITS\PROJECTS\Scholarship_Awards\FA_Xwalk\Copy of Fund_Xwalk_071613-2.csv" on data row 153.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - Copy of Fund_Xwalk_071613-2_csv" (1) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
July 31, 2013 at 2:04 pm
The errors are quite specific.
There's a truncation at line 153 for column FIN_ACCI_TITLE.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
July 31, 2013 at 2:24 pm
Thanks! I think I see the problem. Line 153: there is a rogue comma in the data in a preceeding field: "Thomas, Dean Hoskins Schlp" which delimits that data erroneously - the cascading effect of which is to end up with an extra column not previously mapped, after the last column "FIN_ACCI_TITLE". We should have paid more attention to the row hint. Again, thanks much!
July 31, 2013 at 2:38 pm
nealz (7/31/2013)
Thanks! I think I see the problem. Line 153: there is a rogue comma in the data in a preceeding field: "Thomas, Dean Hoskins Schlp" which delimits that data erroneously - the cascading effect of which is to end up with an extra column not previously mapped, after the last column "FIN_ACCI_TITLE". We should have paid more attention to the row hint. Again, thanks much!
No problem, glad to help.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply