马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
SELECT DispatchList.cDLCode AS 发货退货单号, DispatchList.dDate AS 发货日期, SaleBillVouch.cSBVCode AS 销售发票号, SaleBillVouch.dDate AS 开票日期, DispatchList.cCusName AS 客户名称, DispatchLists.cInvName AS 存货名称, DispatchLists.iQuantity AS 发货数量, SaleBillVouchs.iQuantity AS 开票数量 from DispatchLists left JOIN DispatchList on DispatchList.DLID = DispatchLists.DLID
inner JOIN saleBillVouch ON DispatchList.cDLCode=salebillvouch.cdlcode
or salebillvouch.cdlcode like '%'+','+DispatchList.cDLCode
or salebillvouch.cdlcode like DispatchList.cDLCode+','+'%'
or salebillvouch.cdlcode like '%,'+dispatchlist.cdlcode+',%'
inner JOIN SaleBillVouchs
ON SaleBillVouch.SBVID = SaleBillVouchs.SBVID
and DispatchLists.cInvName=SaleBillVouchs.cInvName
and salebillvouchs.idlsid=dispatchlists.idlsid
order by salebillvouch.csbvcode
|