急﹐這個語句在oracle下怎么寫? 在線等
select itemcode=a.itemcode,itemdesc=a.itemdesc
,inv01=isnull(sum(b.quantity_in),0)
,inv02=isnull(sum(b.quantity_out),0)
from mrptmp a
left join(
select itemcode,quantity_in=quantity,quantity_out=0
from inv01
where inv01date between '2005-1-1' and '2005-1-31'
union all
select itemcode,quantity_in=0,quantity_out=quantity
from inv02
where inv02date between '2005-1-1' and '2005-1-31'
)b on a.itemcode=b.itemcode
group by a.itemcode,a.itemdesc
以上是在SQL中的語句﹐在oracle下提示﹕ oracle-00923 無法在應該出現FROM關鍵字的位置上找到它