MySQL Forums
Forum List  »  Newbie

Expanding a comma-sep field
Posted by: Don Briggs
Date: August 18, 2004 10:04AM

I have a table that has an ID field, and a CHAR field containing a comma delimeted list of numbers. I need a SELECT statement that will expand the list of values, and cross-join them with the tables primary key. We are using MySql Ver. 4.0.18

Here is what I have
item_id | codes
1 | 100,200,300
2 | 100,300

Here is what I need
item_id | code
1 | 100
1 | 200
1 | 300
2 | 100
2 | 300

Please Help!!!!!

Options: ReplyQuote


Subject
Written By
Posted
Expanding a comma-sep field
August 18, 2004 10:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.