I have the following table (the number of the references is variable):
Id | FK_ID| Reference |
-----------------------
1 2100 GI2, GI32
2 2344 GI56
I posted a generic solution for this type of transform under Split comma separated entries to rows
To view results for this sample data, replace the session data with:
INSERT INTO session.sample_data SELECT 1, 2100, 'GI2,GI32' FROM sysibm.sysdummy1;
INSERT INTO session.sample_data SELECT 2, 2344, 'GI56' FROM sysibm.sysdummy1;
Results:
ID OTHERID DATA
1 2100 GI2
1 2100 GI32
2 2344 GI56