AlfredBaker
asked on
Split a Single Column into Multiple Columns in SSIS
Hi Experts, I have a Source table which has one Column and the values in the Column are Pipe Seperated
Ex: 1234|5678|91012|abc|def|gh ij|klm|nop
I have to split this column into multiple columns and then populate it into a target table.
I have to Split the Column Whereever I find a Pipe symbol. How can I do this using SSIS. Any help or suggestion is highly appreciated.
Thanks
Ex: 1234|5678|91012|abc|def|gh
I have to split this column into multiple columns and then populate it into a target table.
I have to Split the Column Whereever I find a Pipe symbol. How can I do this using SSIS. Any help or suggestion is highly appreciated.
Thanks
ASKER
Thanks for the suggestion Irek, In my case i dont have a definitive number of columns. What can be done in this case.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. Use Derivates columns component and together with expressions crate always maximum number of columns using substring, findstring or better to use TOKEN (from SQLServer2012) function (http://technet.microsoft.com/en-us/library/hh213216.aspx)
2. Use Script component and split string there using C# or VB and assign to variables which you can assign in derivate columns. With script you can better control any extreme cases like no data, only one column etc.
Hope that helps.