SQL查询物料库存及辅助属性

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

SQL查询物料库存及辅助属性

之前文章说到赋值辅助属性的,有人就问我后台怎么查询物料与辅助属性,不多说,上sql ``` SELECT wl.FNUMBER 物料编码,wlm.FNAME 物料名称,wlm.FSpecification 规格型号, ck.FNUMBER 仓库编码,TSSL.FNAME 库存状态,ISNULL(ph.FNUMBER,'') 批号 ,JSKC.FBASEQTY 主库存量,TUL0.FNAME 库存单位,JSKC.FSecQty 辅单位数量,TUL2.FNAME 辅单位, aux.FF100001 长, aux.FF100002 宽 FROM T_STK_INVENTORY JSKC LEFT JOIN T_BD_STOCK ck ON ck.FSTOCKID=JSKC.FSTOCKID LEFT JOIN T_BD_STOCK_L ckm ON ck.FSTOCKID=ckm.FSTOCKID AND ckm.FLOCALEID=2052 LEFT JOIN T_BD_LOTMASTER ph ON ph.FLOTID=jskc.FLOT --物料相关字段 LEFT JOIN T_BD_MATERIAL wl ON wl.FMASTERID=JSKC.FMATERIALID AND wl.FUSEORGID=ck.FUSEORGID LEFT JOIN T_BD_MATERIAL_l wlm ON wl.FMATERIALID=wlm.FMATERIALID AND wlm.FLOCALEID=2052 LEFT JOIN T_BD_MATERIALBASE jb ON jb.FMATERIALID = wl.FMATERIALID LEFT JOIN T_BD_MATERIALSTOCK kc ON kc.FMATERIALID = jb.FMATERIALID LEFT JOIN T_ORG_ORGANIZATIONS zz ON zz.FORGID=JSKC.FOWNERID --货主 LEFT JOIN T_BD_UNIT TUS ON kc.FSTOREUNITID = TUS.FUNITID LEFT JOIN T_BD_UNIT_L TUL0 ON kc.FSTOREUNITID = TUL0.FUNITID AND TUL0.FLOCALEID = 2052 LEFT JOIN T_BD_UNIT_L TUL2 ON JSKC.FSECUNITID = TUL2.FUNITID AND TUL2.FLOCALEID = 2052 LEFT JOIN T_BD_STOCKSTATUS_L TSSL ON JSKC.FSTOCKSTATUSID = TSSL.FSTOCKSTATUSID AND TSSL.FLOCALEID = 2052 --辅助属性 left join T_BD_FLEXSITEMDETAILV aux ON JSKC.FAuxPropId = aux.FID left join T_BAS_AssistantDataEntry tFF100003 on aux.FF100003 = tFF100003.FENTRYID left join T_BAS_AssistantDataEntry_l tFF100003_l on (tFF100003.FENTRYID = tFF100003_l.FENTRYID and tFF100003_l.FLOCALEID = 2052)

SQL查询物料库存及辅助属性

之前文章说到赋值辅助属性的,有人就问我后台怎么查询物料与辅助属性,不多说,上sql```SELECT wl.FNUMBER 物料编码,wlm.FNAME 物料名称...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息