I have a table called personal_websessions
that contains data in the following format:
id_no | website_link
1 | google.com msn.com gmail.com
2 | stackoverflow.com reddit.com
3 | msn.com
You can create this table using the following SQL commands:
CREATE TABLE personal_websessions(id_no INTEGER PRIMARY KEY, website_link TEXT);
INSERT INTO personal_websessions VALUES(1, 'google.com msn.com gmail.com'), (2, 'stackoverflow.com reddit.com'), (3, 'msn.com ');
I would like to split the values of the website_link column by the spaces ' ' to attain the following table result:
id_no | website_link
1 | google.com
1 | msn.com
1 | gmail.com
2 | stackoverflow.com
2 | reddit.com
3 | msn.com
I would like to split the website_link column by a single space to achieve this - I have tried different methods including those outlined here:
But this example did not help that much as it was for comma separated not space separated
I know there is a way to do this using sqlite but I just haven't figured it out yet! Any help is greatly appreciated!
Thanks - Goosfraba