表数据如下:
ids id
3,4,6 5
23,24,26,27 28想要使用一个sql,将ids拆分后查询到如下记录。请教如何实现。
ids id
3 5
4 5
6 5
23 28
24 28
26 28
27 28
ids id
3,4,6 5
23,24,26,27 28想要使用一个sql,将ids拆分后查询到如下记录。请教如何实现。
ids id
3 5
4 5
6 5
23 28
24 28
26 28
27 28
解决方案 »
- ORA-12545: 因目标主机或对象不存在,连接失败
- 请问个管道化表函数的用法。
- 低调求助 , oracle 雕用object 方法问题
- 一个过程参数传入问题
- 如何优化更新多条记录
- 在Oracle中,能不能同时执行多条alter.
- ORACLE出现错误警告,导致无法连接:oracle instance jh - can not allocate log , archival required
- 怎么才可以CONNECT AS SYSDBA?
- 请问:那里有Oracle安装文件下载?(FOR WIN XP)
- 难题,难
- 为什么like里面用[]和^不起作用
- oracle数据库在本地可以访问,服务器上不能访问
select regexp_substr(ids, '[^,]+',1,lvl) ids, lvl, id from t,
(select level lvl from dual connect by
level < =(select max(length(regexp_replace(ids,'[^,]','')))+1 max_tokens from t))
) where ids is not null order by id, lvl;