有人可以讲一下这个字符串分割是怎么做的吗?怎么过滤查询?

99999.png

FineReport 咕咕咕 发布于 2019-12-24 11:44
1min目标场景问卷 立即参与
回答问题
悬赏:4 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共8回答
最佳回答
3
PoseidonLv5高级互助
发布于2019-12-24 14:55(编辑于 2021-4-25 11:54)
先拆;然后拆:分列。 有一个深入的难点,就是第一个行是2组,但如果是n组呢? with T1 as (SELECT distinct REGEXP_SUBSTR(data, '[^;]+', 1, level, 'c') AS source_string FROM test_split connect by level <= length(data) - length(REGEXP_REPLACE(data, ';', '')) + 1) select source_string,substr(source_string, 1, instr(source_string, ':',1,1) - 1) first, substr(source_string, instr(source_string, ':',1,1) +1, (instr(source_string, ':',1,2) - instr(source_string, ':',1,1)-1)) second, substr(source_string, instr(source_string, ':',1,2) +1, (instr(source_string, ':',1,3) - instr(source_string, ':',1,2)-1)) third, substr(source_string, instr(source_string, ':',1,3) +1) forth from t1
  • admin_1988 admin_1988 考试的数据库链接 怎么连接呀?
    2020-12-03 15:31 
  • SSVIP SSVIP 厉害୧(๑•̀◡•́๑)૭
    2021-02-07 16:53 
最佳回答
1
WilldofineLv5见习互助
发布于2021-4-25 07:19(编辑于 2021-4-25 11:54)
先拆;然后拆:分列。 有一个深入的难点,就是第一个行是2组,但如果是n组呢? with T1 as (SELECT distinct REGEXP_SUBSTR(data, '[^;]+', 1, level, 'c') AS source_string FROM test_split connect by level <= length(data) - length(REGEXP_REPLACE(data, ';', '')) + 1) select source_string,substr(source_string, 1, instr(source_string, ':',1,1) - 1) first, substr(source_string, instr(source_string, ':',1,1) +1, (instr(source_string, ':',1,2) - instr(source_string, ':',1,1)-1)) second, substr(source_string, instr(source_string, ':',1,2) +1, (instr(source_string, ':',1,3) - instr(source_string, ':',1,2)-1)) third, substr(source_string, instr(source_string, ':',1,3) +1) forth from t1
最佳回答
0
黄源Lv6中级互助
发布于2019-12-24 12:11(编辑于 2021-4-25 11:54)
先拆;然后拆:分列。 有一个深入的难点,就是第一个行是2组,但如果是n组呢? with T1 as (SELECT distinct REGEXP_SUBSTR(data, '[^;]+', 1, level, 'c') AS source_string FROM test_split connect by level <= length(data) - length(REGEXP_REPLACE(data, ';', '')) + 1) select source_string,substr(source_string, 1, instr(source_string, ':',1,1) - 1) first, substr(source_string, instr(source_string, ':',1,1) +1, (instr(source_string, ':',1,2) - instr(source_string, ':',1,1)-1)) second, substr(source_string, instr(source_string, ':',1,2) +1, (instr(source_string, ':',1,3) - instr(source_string, ':',1,2)-1)) third, substr(source_string, instr(source_string, ':',1,3) +1) forth from t1
最佳回答
0
JackloveLv7高级互助
发布于2019-12-24 13:03(编辑于 2021-4-25 11:54)
先拆;然后拆:分列。 有一个深入的难点,就是第一个行是2组,但如果是n组呢? with T1 as (SELECT distinct REGEXP_SUBSTR(data, '[^;]+', 1, level, 'c') AS source_string FROM test_split connect by level <= length(data) - length(REGEXP_REPLACE(data, ';', '')) + 1) select source_string,substr(source_string, 1, instr(source_string, ':',1,1) - 1) first, substr(source_string, instr(source_string, ':',1,1) +1, (instr(source_string, ':',1,2) - instr(source_string, ':',1,1)-1)) second, substr(source_string, instr(source_string, ':',1,2) +1, (instr(source_string, ':',1,3) - instr(source_string, ':',1,2)-1)) third, substr(source_string, instr(source_string, ':',1,3) +1) forth from t1
  • 咕咕咕 咕咕咕(提问者) 分割这里我搞明白了,但是在分类查询的地方不知道怎么设置
    2019-12-24 13:13 
最佳回答
0
cherry团子Lv6中级互助
发布于2019-12-24 13:05(编辑于 2021-4-25 11:54)
先拆;然后拆:分列。 有一个深入的难点,就是第一个行是2组,但如果是n组呢? with T1 as (SELECT distinct REGEXP_SUBSTR(data, '[^;]+', 1, level, 'c') AS source_string FROM test_split connect by level <= length(data) - length(REGEXP_REPLACE(data, ';', '')) + 1) select source_string,substr(source_string, 1, instr(source_string, ':',1,1) - 1) first, substr(source_string, instr(source_string, ':',1,1) +1, (instr(source_string, ':',1,2) - instr(source_string, ':',1,1)-1)) second, substr(source_string, instr(source_string, ':',1,2) +1, (instr(source_string, ':',1,3) - instr(source_string, ':',1,2)-1)) third, substr(source_string, instr(source_string, ':',1,3) +1) forth from t1
最佳回答
0
山夕Lv5见习互助
发布于2020-9-18 16:42(编辑于 2021-4-25 11:54)
先拆;然后拆:分列。 有一个深入的难点,就是第一个行是2组,但如果是n组呢? with T1 as (SELECT distinct REGEXP_SUBSTR(data, '[^;]+', 1, level, 'c') AS source_string FROM test_split connect by level <= length(data) - length(REGEXP_REPLACE(data, ';', '')) + 1) select source_string,substr(source_string, 1, instr(source_string, ':',1,1) - 1) first, substr(source_string, instr(source_string, ':',1,1) +1, (instr(source_string, ':',1,2) - instr(source_string, ':',1,1)-1)) second, substr(source_string, instr(source_string, ':',1,2) +1, (instr(source_string, ':',1,3) - instr(source_string, ':',1,2)-1)) third, substr(source_string, instr(source_string, ':',1,3) +1) forth from t1
最佳回答
0
shirley930107Lv5见习互助
发布于2021-3-23 15:41(编辑于 2021-4-25 11:54)
先拆;然后拆:分列。 有一个深入的难点,就是第一个行是2组,但如果是n组呢? with T1 as (SELECT distinct REGEXP_SUBSTR(data, '[^;]+', 1, level, 'c') AS source_string FROM test_split connect by level <= length(data) - length(REGEXP_REPLACE(data, ';', '')) + 1) select source_string,substr(source_string, 1, instr(source_string, ':',1,1) - 1) first, substr(source_string, instr(source_string, ':',1,1) +1, (instr(source_string, ':',1,2) - instr(source_string, ':',1,1)-1)) second, substr(source_string, instr(source_string, ':',1,2) +1, (instr(source_string, ':',1,3) - instr(source_string, ':',1,2)-1)) third, substr(source_string, instr(source_string, ':',1,3) +1) forth from t1
最佳回答
0
yzmGcMwe1752561Lv2见习互助
发布于2022-12-13 15:38

sqlite 不支持函数 regexp_substr 的吧

  • 12关注人数
  • 2560浏览人数
  • 最后回答于:2022-12-13 15:38
    请选择关闭问题的原因
    确定 取消
    返回顶部