1st Method - You can achieve this using an SQL statement
In the Data Flow Task, in the OLEDB Source
select the source type as SQL Command
and use the following command (replace Tablename
with your table name):
;WITH tmp(ID, DataItem, [Group]) AS(
SELECT ID, LEFT([Group], CHARINDEX(',', [Group] + ',') -1),
STUFF([Group], 1, CHARINDEX(',', [Group] + ','), '')
FROM [Tablename]
UNION ALL
SELECT ID, LEFT([Group], CHARINDEX(',',[Group]+',')-1),
STUFF([Group], 1, CHARINDEX(',',[Group]+','), '')
FROM tmp
WHERE [Group] > ''
)
SELECT ID, DataItem
FROM tmp
ORDER BY ID
SQL Fiddle demo
References
2nd Method - Using Script Component
You can refer to this link for a detailed answer: