存货收发汇总表查询错误,提示:查询出现异常。列名 'FMODEL' 不明确。
详细的错误提示如下:
SELECT T.FMATERIALBASEID,T.FMATERIALID,FMATERIALNAME,GROUPL.FNAME FMATERIALGROUP,FMODEL, FLOTNO, FASSIPROPERTYID,ENUML.FCAPTION FMATERPROPERTY,MT.FNAME FMATERTYPE, BOM.FNUMBER FBOMNO,FPLANNO,FSEQUENCENO,FPROJECTNO,FOWNERID,OWN.FNAME FOWNERNAME,FSTOCKORGID,SORG.FNAME FSTOCKORGNAME,T.FSTOCKID,STOCK.FNAME FSTOCKNAME, FSTOCKPLACEID,FSTOCKPLACENAME,RANG.FNUMBER FACCTGRANGEID,RANGL.FNAME FACCTGRANGENAME,UNITL.FNAME FUNITNAME,t.FUnitID , FINITQTY,FINITPRICE, FINITAMOUNT,FRECEIVEQTY, FRECEIVEPRICE, FRECEIVEAMOUNT,FSENDQTY, FSENDPRICE, FSENDAMOUNT,FENDQTY,FENDPRICE, FENDAMOUNT, t.FSTOCKSTATUSID,sts.FNAME FSTOCKSTATUSNAME,FDIMID,FDIMID as FAcctgDimID,FASSIPROPNAME,2 as FDIGITS, 4 as FPRICEDIGITS,unit.FPRECISION as FQtyDigits,ENUML1.FCAPTION FVALUATION,FIsTotal,FGroupByFIeld,FDetailBillFormId FDetailReportFormId, ROW_NUMBER() OVER(ORDER BY T.FMATERIALID asc ,T.FDIMID asc,T.FISTOTAL desc ) FIDENTITYID into TMP4B1BFAB1A93211E5A8B0AECA50B from #TM_HS_StockInSummaryData T left join T_BD_STOCKSTATUS_L sts on t.FSTOCKSTATUSID = sts.FSTOCKSTATUSID and sts.FLOCALEID=2052 left join T_BD_UNIT unit on unit.funitid = t.FUnitID left join T_HS_ACCTGRANGE RANG on T.FACCTGRANGEID = RANG.FACCTGRANGEID left join T_ORG_ORGANIZATIONS_L SORG on T.FSTOCKORGID = SORG.FORGID and SORG.FLOCALEID = 2052 left join T_ORG_ORGANIZATIONS_L OWN on T.FOWNERID = OWN.FORGID and OWN.FLOCALEID = 2052 left join t_BD_Stock_L STOCK on T.FSTOCKID = STOCK.FSTOCKID and STOCK.FLOCALEID = 2052 left join T_HS_ACCTGRANGE_L RANGL on T.FACCTGRANGEID = RANGL.FACCTGRANGEID and RANGL.FLOCALEID = 2052 left join T_BD_UNIT_L UNITL on T.FUNITID = UNITL.FUNITID and UNITL.FLOCALEID = 2052 left join T_BD_MATERIALCATEGORY_L MT on T.FMATERTYPE = MT.FCATEGORYID and MT.FLOCALEID = 2052 left join t_eng_bom BOM on BOM.FID = T.FBOMNO left join T_META_FORMENUMITEM ENUM on ENUM.FID = 'ac14913e-bd72-416d-a50b-2c7432bbff63' and ENUM.FVALUE = T.FMATERPROPERTY left join T_META_FORMENUMITEM_L ENUML on ENUM.FENUMID = ENUML.FENUMID and ENUML.FLOCALEID = 2052 left join T_META_FORMENUMITEM ENUM1 on ENUM1.FID = 'eca675f6-d296-4ba9-b9df-170b7b286a73' and ENUM1.FValue = t.FVALUATION left join T_META_FORMENUMITEM_L ENUML1 on ENUM1.FENUMID = ENUML1.FENUMID and ENUML1.FLOCALEID = 2052 left join t_bd_Material MAT ON T.FMATERIALBASEID = MAT.FMATERIALID left join T_BD_MATERIALGROUP_L GROUPL ON MAT.FMATERIALGROUP=GROUPL.FID AND GROUPL.FLOCALEID= 2052 where 1 = 1
推荐阅读