pl/sql development 查询的数据复制到excel

chr(9)tab键
chr(10)换行
chr(13)回车
chr(13)&chr(10)回车换行


查询的数据复制到excel,若一个字段值占2个或2个以上单元格,则可能有上述符号,可用instr查出,可用replace删掉
select n_id,s_name from t_a t where stat_time=20171206 and instr(s_name,chr('10'))>0;
select n_id,s_name from t_a t where stat_time=20171206 and instr(s_name,chr('13'))>0;
select n_id,s_name from t_a t where stat_time=20171206 and instr(s_name,chr('09'))>0;

select n_id,s_name,replace(s_name,chr(9)) a2 from t_a t where stat_time=20171206 and instr(s_name,chr('09'))>0;

原文地址:https://www.cnblogs.com/jiangqingfeng/p/7998373.html