簡體   English   中英

字符串與值分離

[英]String separation from value

請你幫忙。 我有這個:

在此處輸入圖像描述

我想要這個:

在此處輸入圖像描述

和這個:

在此處輸入圖像描述

在單獨的查詢中。

你可以做類似的事情

select  *
from yourtable
where columnone in
 (select regexp_substr('UserOne,UserTwo,UserThree','[^,]+', 1, level)
  from dual
  connect BY regexp_substr('UserOne,UserTwo,UserThree', '[^,]+', 1, level)
  is not null);

看起來你可以只運行子查詢

select regexp_substr('UserOne,UserTwo,UserThree','[^,]+', 1, level)
from dual
connect BY regexp_substr('UserOne,UserTwo,UserThree', '[^,]+', 1, level)
is not null
offset 1 rows fetch next 1 rows only

在不同的查詢中更改給定offsetfetch的值。

https://www.oratable.com/regex-split-comma-separated-string/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM