SELECT SW_JOURNAL_NUMBER,SW_ID,SW_TO_ID,CI_NAME,CI_LINKMAN,CI_TEL,CI_TEL,CI_MOBILE, (SELECT SUM(WG_AMOUNT) FROM dbo.SBD_WAYBILL_GOODS WHERE WG_SW_ID=SW_ID GROUP BY WG_SW_ID) AS SW_AMOUNT, SW_STATUS FROM dbo.SBD_WAYBILL w LEFT JOIN dbo.SBD_ASSEMBLYBILL_WAYBILL aw ON w.SW_ID =aw.AW_SW_ID LEFT JOIN dbo.SBD_ASSEMBLY_BILL ab ON aw.AW_AB_ID=ab.AB_ID LEFT JOIN dbo.SBD_CUSTOMER_INFO ci ON w.SW_TO_ID=ci.CI_ID WHERE AB_ID=173
如果本文引用了你的文章而未注明,请及时联系我。