跳至主要內容

客户对账单

五六零网校小于 1 分钟

示例代码

SELECT T0.[CardName] AS '客户名称', T0.[Address2] AS '收货地址', 
T2.[Name] AS '联系人', GETDATE() AS '制表日期', T0.[DocNum] AS '送货单号'
	, T0.[TaxDate], T0.[NumAtCard] AS '客户单号', 
T1.[VendorNum] AS '客户编码', T1.[Dscription] AS '物料描述', 
T1.[Quantity]
, T1.[PriceAfVAT], T1.[LineTotal]
FROM ODLN T0
	INNER JOIN DLN1 T1 ON T0.[DocEntry] = T1.[DocEntry]
	INNER JOIN OCPR T2 ON T0.[CntctCode] = T2.[CntctCode]