elsenorjose
Technical User
Hello all,
I've been searching the forums for an answer to my problem and the closest I've found is thread149-1217977
The problem is, it doesn't appear to have ever been resolved. I have a similar problem in that a database redesign resulted in what used to be multiple rows in a table being concatenated into one row with certain IDs being stored in a pipe delimited field; bad design, I know, but it's what I have to work with. What I need to do is split out those values and then join them to another table. For illustration purposes, I have a table, Lot, with the following fields (there are more but these are the important ones:
LotNumber
MaterialIDs
There is only one LotNumber and in the MaterialIDs field I have:
Material1ID|Material2ID|Material3ID...etc, literally, concatenated with the | symbol
I need to join the Material IDs to another table called Materials, that holds the description of each material each with a unique MaterialID:
MaterialID
Description
So Material1ID = Plastic Bottle, Material2ID = Child Proof Cap, and Material3ID = Foil Lining.
Since I can't map the concatenated MaterialIDs field in the Lot table to the normalized MaterialID in the Materials table, I need to split the MaterialIDs field and then join it to the MaterialID field in the Materials table and display the Description values.
Is this possible? I'm using Crystal Reports XI Developer and MS SQL Server 2005.
Thank you.
I've been searching the forums for an answer to my problem and the closest I've found is thread149-1217977
The problem is, it doesn't appear to have ever been resolved. I have a similar problem in that a database redesign resulted in what used to be multiple rows in a table being concatenated into one row with certain IDs being stored in a pipe delimited field; bad design, I know, but it's what I have to work with. What I need to do is split out those values and then join them to another table. For illustration purposes, I have a table, Lot, with the following fields (there are more but these are the important ones:
LotNumber
MaterialIDs
There is only one LotNumber and in the MaterialIDs field I have:
Material1ID|Material2ID|Material3ID...etc, literally, concatenated with the | symbol
I need to join the Material IDs to another table called Materials, that holds the description of each material each with a unique MaterialID:
MaterialID
Description
So Material1ID = Plastic Bottle, Material2ID = Child Proof Cap, and Material3ID = Foil Lining.
Since I can't map the concatenated MaterialIDs field in the Lot table to the normalized MaterialID in the Materials table, I need to split the MaterialIDs field and then join it to the MaterialID field in the Materials table and display the Description values.
Is this possible? I'm using Crystal Reports XI Developer and MS SQL Server 2005.
Thank you.