Split Comma
DROP TABLE IF EXISTS tmp_keyword_dev_filter;
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_keyword_dev_filter (token TEXT);
DELETE FROM tmp_keyword_dev_filter WHERE 1=1;
INSERT INTO tmp_keyword_dev_filter
WITH RECURSIVE
tmp_split_field_(datum, value, legacy) AS (
SELECT "", "", Value || ","
FROM sys_keyword WHERE 1=1 AND Code = "DF01"
UNION ALL
SELECT SUBSTR(legacy, 0, INSTR(legacy, ",")),
SUBSTR(legacy, 0, INSTR(legacy, ",")),
SUBSTR(legacy, INSTR(legacy, ",") + 1)
FROM tmp_split_field_ WHERE 1=1 AND legacy != ""
)
SELECT datum FROM tmp_split_field_ WHERE 1=1 AND datum <> "";
SELECT token FROM tmp_keyword_dev_filter;
sqlite>
sqlite> SELECT Value FROM sys_keyword WHERE 1=1 AND Code = "DF01";
KW00,KW01,KW02,KW03,KW04,KW05
sqlite>
sqlite>