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;

posted @ 2017-12-07 11:43  江清风  阅读(290)  评论(0编辑  收藏  举报