ORACLE 语句问题
select id,metaName,material_name,purchasingPrice as price,unit,spec ,packingUnit_S,S2sub,
(select cast(nvl(purchasingPrice,0) as varchar(50)) || '/'||packingUnit from YK_23_inStock a join
YK_23_inStock_detail b on a.inStock_id=b.inStock_id where rownum<=1 and b.medicine_code=material.id and
charge_type=9 and inType=1 order by b.id desc ) purchasingPrice_old from material where rownum<=10 and
Hospital_ID=1 and isOut=1
子查询里的order by b.id desc 这里报错。显示缺失右括号。可是看不出来错误在哪 0 0.还望大神指导下
------解决方案--------------------里面应该是个单行子查询吧,为何要加排序呢?
order by 字句去掉就行了吧