0

I am using SSIS and am trying to convert a flat file that has a column for SSN and RN to a table that has 2 columns, one for SSN which is varchar(9) and the other for RN which is varchar(2).
How do I split the flat file up into the 2 separate columns?

Rakesh KR
  • 6,357
  • 5
  • 40
  • 55

1 Answers1

0

I figured it out. I was trying to do a cast and i switched it to a substring. I created one expression that would start at the first character and pull 9 characters. I then created a second expression that would start at character 10 and pull 2 characters. Once that was done, I did a data conversion to switch them to a string.

SUBSTRING([SSN      RN],1,9)
SUBSTRING([SSN      RN],10,2)

The job was successful and was imported into the table as 2 separate columns