1.查询出来数据保留小数点2位,并且0.01时候,不会展示为.01。
select to_char(0.1,'fm9999999990.00') from dual;
2.wm_concat 多行转一行
select orders,name||weight||unit||'*'||quantity as info from XX_ORDER_ITEM
WHERE ORDERS ='160622095600076'
转成1行
select t.orders,TO_CHAR(wm_concat(t.info)) as infos from
(select orders,name||weight||unit||'*'||quantity as info from XX_ORDER_ITEM
WHERE ORDERS ='160622095600076')t
group by t.orders