select cast
(
(select purchasingPrice from YF_23_inStock_detail
where rownum<=1
and charge_type!=9
order by instock_id desc
) as numeric(18,2)
) as AfterPrice
from dual
报错:缺失右括号。。。
cast只能转换列,不能转换只有单列的表???怎么解决????谢谢各位!
------解决方案--------------------------------------------------------
SELECT CAST(PURCHASINGPRICE AS NUMERIC(18, 2)) AS AFTERPRICE
FROM (SELECT PURCHASINGPRICE FROM YF_23_INSTOCK_DETAIL
WHERE ROWNUM <= 1
AND CHARGE_TYPE != 9
ORDER BY INSTOCK_ID DESC)