Parade Series - Store

发布时间:2024年01月04日

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>

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

文章来源:https://blog.csdn.net/unix2linux/article/details/135379936
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。