查询收发汇总/明细 出现异常错误
即时库存 前台 按货主查询没有为空的
查询出现异常。Cannot insert the value NULL into column 'FOWNERID', table 'AIS_K3CLOUD_V5_JOYOU_STD.dbo.TMPEFA2F5F1743811E49D8700155D0'; column does not allow nulls. INSERT fails.
The statement has been terminated.
INSERT INTO TMPEFA2F5F1743811E49D8700155D0 (FFORMID, FSTOCKORGID, FOWNERTYPEID, FOWNERID, FDATE, FORDERBY, FSTOCKIO, FMATERIALID, FAUXPROPID, FLOTNO, FMTONO, FSTOCKID, FSTOCKLOCID, FSTOCKSTATUSID, FKEEPERTYPEID, FKEEPERID, FPRODUCEDATE, FEXPIRYDATE, FBOMID, FBASEQCQTY, FSECQCQTY) SELECT 'STKINV', TSE.FSTOCKORGID fstockorgid, TSE.FOWNERTYPEID fownertypeid, VO.FITEMID fownerid, DATEADD(D, 1, TSE.FBALDATE) fdate, -200 forderby, 'I' fstockio, TM.FMATERIALID fmaterialid, ISNULL(TSE.FAUXPROPID, 0) fauxpropid, ISNULL(TBLM.FNUMBER, ' ') flotno, ISNULL(TSE.FMTONO, ' ') fmtono, TBS.FSTOCKID fstockid, ISNULL(TSE.FSTOCKLOCID, 0) fstocklocid, TSE.FSTOCKSTATUSID fstockstatusid, TSE.FKEEPERTYPEID, VK.FITEMID fkeeperid, TSE.FPRODUCEDATE, TSE.FEXPIRYDATE, ISNULL(TB.FID, 0) fbomid, SUM(TSE.FBASEENDQTY) fbaseqcqty, SUM(TSE.FSECENDQTY) fbaseqcqty FROM T_STK_INVBAL TSE INNER JOIN T_BD_MATERIAL TM ON (TM.FMASTERID = TSE.FMATERIALID AND (TM.FUSEORGID = TSE.FSTOCKORGID OR EXISTS (SELECT 1 FROM T_META_BASEDATA
推荐阅读