MySQL: select words as rows even som are "new line" separated in one field

Posted by Tillebeck on Stack Overflow See other posts from Stack Overflow or by Tillebeck
Published on 2010-03-19T12:43:32Z Indexed on 2010/03/19 12:51 UTC
Read the original article Hit count: 397

Filed under:
|
|

Hi

I have a table with a field where words are written separated with new lines. So a select on this single field from to rows will output 3 lines for first row and 2 lines for second row:

Row1    designationer
        nye kolonier
        mindre byer
Row2    udsteder
        bopladser

I would like to do a select that select all these lines as if they had been rows in the table like:

SELECT do_the_split(field) FROM table

so the result would be more like:

Row1    designationer
Row2    nye kolonier
Row3    mindre byer
Row4    udsteder
Row5    bopladser

is there any way to do this in MySQL?

BR. Anders

© Stack Overflow or respective owner

Related posts about mysql

Related posts about select