[plug] [OT] SQL column splitting

James Devenish devenish at guild.uwa.edu.au
Mon Nov 15 18:18:26 WST 2004


Hi,

For a set of rows matching certain criteria, I wish to 'split' each row
into multiple rows based on a string delimiter in one of the columns. To
illustrate the idea, imagine that I want like to split

('1', 'A', 'x,y, z')
('2', 'B', 'i')

into

('1', 'A', 'x')
('1', 'A', 'y')
('1', 'A', ' z')
('2', 'B', 'i')

Does anyone know of a non-horrific way to do this fairly portably in
SQL? My mind seems to be blank on the matter at the moment.





More information about the plug mailing list