oracle 中字段長度的截取 與 日期格式化的sqlsql
select XM,to_char(to_data(substr(RSRQ,1,8),'yyyy-mm-dd'),'YYYY"年"MM"月"DD"日"') as RSRQ, substrb(AJMC,1,30) as ajmc from table; select XM,substr(RSRQ,1,4) ||'年'||substr(RSRQ,5,2) ||'月'||substr(RSRQ,7,2) || '日' as RSRQ from table;