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
UPDATE: There are correct answers below but ended up doing it in a semi-manual way. I did this:
- exporting the the column to a csv
- Open file in notepad and remove the pings around each line
- now each word is on a new line
- save as csv
- import into database where each line will be a new row
Br. Anders