Truncate error in SSIS

Hi friends,

I am trying to get csv file into SQL table using SSIS package. When i tried to execute it, it gave me following error.

[Flat File Source [87]] Error: Data conversion failed. The data conversion for column "visits in 12 months" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

[Flat File Source [87]] Error: The "output column "visits in 12 months" (1768)" failed because truncation occurred, and the truncation row disposition on "output column "visits in 12 months" (1768)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

My field doesnt have any data still it gives truncate error. Any suggestion?

Thanks,
Vijay

April 22nd, 2009 10:41am

What is the target data type for the column?
will it be able to take no value. Error also states Data Conversion.
Check and let me know.
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2009 10:48am

Hi,

i think the size of column "visits in 12 months" that u ve specified in flatfile sourceis not match with the sql table column.
uneed to increase the column size as per requirement.

Also once check column mapping.

Thanks,
Kapil Khalas

April 22nd, 2009 10:57am

Kapil
In case the column width is greater than 255 will Flat file connection pick the entire data?
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2009 11:01am

It is varchar(255)....i thought if it is longer text then varchar(255) will take it...i tried with varchar(4000) as well....
April 22nd, 2009 11:03am

In that case could u check the destination column width?
that should be same or greater than the source column width.
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2009 11:09am

Yes it is varchar(255)...there shouldnt be any field which is more than 50 character long still i made all of them to varchar (255) on both the side....
April 22nd, 2009 11:16am

u can not set varchar datatype for ssis column.
otherwise it gives error - "cannot convert between unicode and non-unicode data types".

sou need touse a Data Conversion transformation. Add it between your datasource and the destination.

hope it solves your problem.

Thanks,
Kapil
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2009 11:27am

It is failing at Flat file source itself...coz when i execure flat file source becomes red....
April 22nd, 2009 11:37am

Yes i am doing that and converting into STRING DT_STR by data conversion facility....
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2009 11:37am

i think this is bcz while u mapping column in destination at that time uare not using data conversion column.
use data conversion column name instead of source file column.

April 22nd, 2009 11:40am

Yes Kapil...i m using data conversion column only.....
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2009 11:47am

hi Vijay.

if u feel this thread is helpful to u so could u please mark as answered.


Regards,
Kapil Khalas
April 24th, 2009 5:06am

Hi,

i didnt get answer yet and i am still working on it...if i get it solved then i would write it as answer....if u want me to mark as answer without my error solved then i would be happy to do it....

regards,
Vijay
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2009 10:41am

You have no given any answered after 22nd April so i guess you got your answered.
So now what is the problem? can u pls explain it?

April 27th, 2009 10:54am

Hi,

i didnt get answer yet and i am still working on it...if i get it solved then i would write it as answer....if u want me to mark as answer without my error solved then i would be happy to do it....

regards,
Vijay
Hi Vijay,
Even I am unable to find the reason to this error.
Hope u are not doing any silly mistake ;)
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2009 11:36am

I would suggest you redirect error rows to another Flat File, and examine the error row, to see what is the problem with that particular row.
June 2nd, 2009 7:19pm

Right click the import step

>Show Advanced Editor

>Input and Output Properties

>Expand the Flat File Source Output

>Expand Output Coulumns

>Select the field you are having truncation issues on

>In the properties menu to the right, scroll down to see DataType and Length under the Data Type Properties heading.

>Increase the length to a value long enough to access the input column.

The truncation is happening at the output before the step finishes so you have to fix it here. Adding additional steps can't help the problem. I run into this issue alot importing from flat files. I imagine this isn't a pending issue for you still, just answering in case someone looks up this thread on here as I often do when researching issues.

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 2:25pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics