|
本帖最后由 崔家豪 于 2020-8-20 13:17 编辑
打开KSQL时报错:
但测试时正常,并且有数据
但页面展示时,红框里的字段不显示数据
源码如下:
select MG_ProdProRoute.*,( MG_OrderPlan.fPlanQty - customSub6.fFinshQty ) as fUnfinQty,(customSub6.fProcessCode) as fProcessCode
from MG_ProdProRoute MG_ProdProRoute
optional join MG_OrderPlan MG_OrderPlan on MG_ProdProRoute.fMatCode = MG_OrderPlan.fMatCode AND MG_ProdProRoute.fProcessIdentification = MG_OrderPlan.fJobType AND MG_ProdProRoute.fWorkMode = MG_OrderPlan.fArtType AND MG_ProdProRoute.fSerialNum >= MG_OrderPlan.fMinProcessNo AND MG_ProdProRoute.fSerialNum <= MG_OrderPlan.fMaxProcessNo AND MG_ProdProRoute.fFactoryCode = MG_OrderPlan.fFactoryCode AND MG_ProdProRoute.fWorkShopCode = MG_OrderPlan.fWorkShopCode
optional join (select MG_EmpOutput.FFKEY as FFKEY, MG_EmpOutput.fProcessCode as fProcessCode, ( sum(MG_EmpOutput.fQty) + sum(SQL.DECODE(MG_EmpOutput.fHelpQty, null, 0, MG_EmpOutput.fHelpQty)) ) as fFinshQty from MG_EmpOutput MG_EmpOutput group by MG_EmpOutput.FFKEY, MG_EmpOutput.fProcessCode) customSub6 on customSub6.ffkey = MG_OrderPlan AND customSub6.fProcessCode = MG_ProdProRoute.fProcessCode
|
|