Mike S
Mike S

Reputation: 306

SSIS how handle var length in Derived column to avoid truncation

I have this setup like in illustration attached, hope it clear enough. I load all xls files in loop from given folder. While implementing new Derived Column box to record FileName from my loop I got truncation error. My variable initially was set to CCS.xls (Len=7, shortest name ).

I tried to increase Length in Derived Column Editor but failed to do this, as it's not active, I can't not type anything there, then I track that that original Length came from Variables value. In Variable windows I have DataType = String and no any option to set length.

So for now I made dummy empty file with looong CCS____1.xls name to avoid this problem and it works OK. But want to learn other good way to avoid this problem, looks like in this setup for data connection I need to use file with longest name (?)

enter image description here

Upvotes: 0

Views: 1154

Answers (1)

Yang.Z
Yang.Z

Reputation: 101

You can change the Length property to 50 or larger manually in Advanced Editor.

Right-Click on the Derived column->Show Advanced Editor->Input and Output Properties->Derived Column Output->Output Columns->the new Column->Data Type Properties->Length

Advanced Editor

Result

Upvotes: 2

Related Questions