0
votes

In SSIS I am creating a package and loading data from oledb source to flat file destination . While loading I have separated columns with semicolon delimiter(;) and rows with CR-LF. And I am using (ansi-latin 1) 1252 encoding.

The issue I am having is following. I have 3 columns name varchar(10),city varchar(10),country varchar(10)

I am getting output in the flat file as

enter image description here

However, I need output like

enter image description here

I want to have extra length left in the column occupied with space as shown above.Please someone help me with this.

1

1 Answers

0
votes

A solution might be: in your Flat File Connection Manager in the Format tab choose: Fixed Width or Regged Right

enter image description here

Here an explanation on the difference.

On the Advanced tab add 3 columns with 10 witdth.

Below the result of exports

enter image description here

but in this case you can not enter the column separators ';' in the file;
a workaround: insert you the separator in the export QUERY (OLE DB Source Editor - SQL Command Text) so they are interpreted as a column of width 1, so you have exactly what you need

I hope this help.