Splitting Field Value into Two Values from Excel Source and Mapping that Field to Two Fields in SQL-Server Using Same SSIS Package

StackOverflow https://stackoverflow.com/questions/21445190

  •  04-10-2022
  •  | 
  •  

Question

I currently have an "ExcelSource" pointing to a "Derived Column" pointing to an "OLE DB Command". All my variables are mapped to the columns in my ExcelSource. My problem is in my DataFlow process. The column Im splitting up needs to be mapped to 2 different columns in the DataBase. What steps do I need to take in my DataFlow process to take the LEFT and RIGHT and put each into two seperate fields in the DataBase when the Field in my ExcelSource can only be mapped to one variable in my OLE DB Command?

Example Field: ABCDEFG/1234

I need to be able to put ABCDEFG in a destination field and 1234 in a separate destination field in SQL-Server

Note: I have already identified the RIGHT and LEFT string functions to do this. Im stuck on the DataFlow task to be able to map one field from the source to two fields in my destination. Ive tried everything.

Thanks in advance.

Was it helpful?

Solution

Figured it out....You must add a "CopyColumn" object that "ExcelSource" connects to and then connect the "CopyColumn" object to "DerivedColumn" object and then connect to "Destination" object in DataFlowTask. Then map the "CopiedColumn" value to the other field needed to be connected to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top