Split a string on sqlite

Hi, I don’t know sqlite but I have to implement a database already done. The problem: i have a column called “answers” in this format: 

House,40|Bed,20|Mirror,10  

ecc.

I want to split the string and remove “,” “|” like this:

VARIABLE A=House VARIABLE A1=40 VARIABLE B=Bed VARIABLE B1=20 VARIABLE C=Mirror VARIABLE C1=10  

 

How can i do it with Lua?

I’m sorry for my english. Thanks to everybody.

Search net for string split implementation in Lua - there’s plenty of it

If you don’t need to search those values via SQL (ie, you’re just using it as a key->value store, there’s no reason you can’t just store json in a txt field. That might make your life easier going forward.

Search net for string split implementation in Lua - there’s plenty of it

If you don’t need to search those values via SQL (ie, you’re just using it as a key->value store, there’s no reason you can’t just store json in a txt field. That might make your life easier going forward.