我在执行查询时收到以下错误“ORA-00923:FROM 关键字未在预期的地方找到”,注意:已经在使用此查询与不同的表及其工作,所以我需要你的帮助:)
LOAD * ,
date(POST_DATE,'MM/DD/YYYY') as VOU_POST_DATE,
date(CREATED_DATE,'MM/DD/YYYY') as VOU_CREATED_DATE,
year (POST_DATE) as VOU_POST_YEAR ,
month (POST_DATE) as VOU_POST_MONTH,
day (POST_DATE) as VOU_POST_DAY,
year (CREATED_DATE) as VOU_CREATED_YEAR ,
month (CREATED_DATE) as VOU_CREATED_MONTH,
day (CREATED_DATE) as VOU_CREATED_DAY;
Select
t.QTY as VOU_QTY,
t.COST as VOU_COST,
t.PRICE as VOU_PRICE,
t.QTY*t.COST as VOU_EXT_COST,
t.QTY*t.PRICE as VOU_EXT_PRICE,
t.ITEM_SID,
o.STORE_NO as VOU_STORE_NO,
o.VOU_NO,
o.VOU_TYPE,
o.VOU_CLASS,
o.VEND_CODE as VOU_VEND_CODE,
o.SLIP_FLAG,
o.TO_NO,
o.REF_VOU_SID,
o.CREATED_DATE,
o.POST_DATE,
o.SLIP_FLAG as SLIP_FLAGS,
o.VERIFIED,
st.QTY as TRANS_OUT_QTY
s.OUT_STORE_NO as SLIP_OUT_STORE,
s.IN_STORE_NO as SLIP_IN_STORE,
CASE
when o.VEND_CODE is not NULL
and o.TO_NO is NULL
then t.QTY
else 0
end CMP_RCVD_QTY,
CASE
when o.VEND_CODE is NULL
and o.TO_NO is not NULL
then t.QTY
else 0
end FST_RCVD_QTY,
CASE
when o.VEND_CODE is NULL
and o.TO_NO is NULL
then t.QTY
else 0
end TRANS_IN_QTY,
CASE
when o.VOU_CLASS=2
then t.QTY
else 0
end ASN_QTY,
from VOUCHER o
join VOU_ITEM t
on o.VOU_SID = t.VOU_SID
Join SLIP s
on s.VOU_SID = o.VOU_SID
join SLIP_ITEM st
on st.ITEM_SID = t.ITEM_SID
where
o.HELD=0 and o.REF_VOU_SID is NULL;