简体   繁体   中英

String separation from value

please can you help. I have this:

在此处输入图像描述

And I want to have this:

在此处输入图像描述

And this:

在此处输入图像描述

In separate queries.

You can do something like

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);

It very much seems that you can just run the subquery

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

change the values given to offset and fetch in your different queries.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM