分割符方法 在oracle中表格name telephone王三/赵四/刘五 123/456/789我想分割成王三 123赵四 456刘五 789在pl/sql中如何写谢谢大家 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果 格式是固定的 你用substr( string, start_position, [ length ] ) 就可以了 在PL/SQL中可以先使用该语句将Name或Phone字段中的数据拆分,然后使用光标读了每一个结果。再插入到其它表中。 tb表里只有一条数据……name telephone王三/赵四/刘五 123/456/789select regexp_substr(name,'[^/]+',1,rownum) name,regexp_substr(telephone,'[^/]+',1,rownum) telephonefrom tb connect by rownum<=length(regexp_replace(name||'/','[^/]+'))多条的话 with tb2 as(select replace(wm_concat(name),',','/') ,replace(wm_concat(telephone),',','/') from tb)再将上面sql中的tb 换成tb2数据量不大的话上述的情况可以解决不过wm_concat()函数连接字符有上限 PL/SQL存储过程为什么没有插入数据? net服务器配置问题 关于数据库大批量操作慢的问题,跪请各位大大帮忙看看。 如何建立数据库别名? 请问oracle数据库的备份和恢复都用什么软件?谢谢! Oracle冷备份的数据,还原后Startup不了 问一个简单的sql语句啊! UPDATE的问题 这样的插入应该怎么写? 在oracle数据库中如何定义SEQUENCE类型的字段? EA建模工具导出的SQL语句有问题 多表拼接问题
再插入到其它表中。
name telephone
王三/赵四/刘五 123/456/789
select regexp_substr(name,'[^/]+',1,rownum) name,
regexp_substr(telephone,'[^/]+',1,rownum) telephone
from tb connect by rownum<=length(regexp_replace(name||'/','[^/]+'))
多条的话
with tb2 as(select replace(wm_concat(name),',','/') ,
replace(wm_concat(telephone),',','/')
from tb)再将上面sql中的tb 换成tb2
数据量不大的话上述的情况可以解决
不过wm_concat()函数连接字符有上限