用代码合成: "Select Distinct Top 8000 {PRINDXDD}.ID,jgzh As [加工组号],xh As [商品序号],OTHER_FL As [包装组号],fhzh As [分货组号],dlgg As [定量规格],dzxh As [袋子型号],{SPBM}.jbdw As [基本单位],processing_spmc As [原料名称],{SPBM}.dwbm As [采购员],KCSL As [净菜库存数量],finishsp_rate As [出成率],{XSDD}.SL / {SPBM}.finishsp_rate * 100 As [订单数量/出成率],processing_spbm As [原料编码],SPJC As [商品简称],RQ As [单据日期],DJBH As [单据编号],JSR As [经手人],JHRQ As [到货日期],{XSDD}.SPBM As [商品编码],{XSDD}.SL As [基本单位之数量],pack_sl As [包装单位之数量],{PACK_UNIT}.jbdw As [订货包装单位],pack_rate As [包装单位转换率],DWJC As [订货单位简称],SPMC As [商品名称],client_spmc As [客户叫法],ZY As [订单说明],KCSL/finishsp_rate*100*-1 As [库存数量],maincompany_jc As [总公司] From ((({PRINDXDD} Left JOIN {XSDD} ON {XSDD}.[ID] = {PRINDXDD}.[ID]) Inner JOIN {WLDWBM} ON {WLDWBM}.[DWBM] = {PRINDXDD}.[DWBM]) Inner JOIN {PACK_UNIT} ON {PACK_UNIT}.[pack_id] = {XSDD}.[id_unit]) Left JOIN {SPBM} ON {SPBM}.[SPBM] = {XSDD}.[SPBM] Where {PRINDXDD}.RQ = #" & date.Today.Adddays(-1) & "# Order By RQ DESC"
|