vuthaiha90 > 18-04-19, 11:27 AM
Xuân Thanh > 18-04-19, 02:04 PM
SELECT tblKhachHang.MaKH, IIf([ChenhLechThuNhapChiPhi]>0,0,[ChenhLechThuNhapChiPhi]) AS SoTienCL, [4eQ_VonCap12].VonCap12 AS SoTienVon, [SoTienCL]+[SoTienVon] AS Tong
FROM (4cQ_ChenhLechThuNhapChiPhi RIGHT JOIN tblKhachHang ON [4cQ_ChenhLechThuNhapChiPhi].MaKH = tblKhachHang.MaKH) LEFT JOIN 4eQ_VonCap12 ON tblKhachHang.MaKH = [4eQ_VonCap12].MaKH;
vuthaiha90 > 18-04-19, 02:41 PM
(18-04-19, 02:04 PM)Xuân Thanh Đã viết: Dùng IIF mà tính
Mã:SELECT tblKhachHang.MaKH, IIf([ChenhLechThuNhapChiPhi]>0,0,[ChenhLechThuNhapChiPhi]) AS SoTienCL, [4eQ_VonCap12].VonCap12 AS SoTienVon, [SoTienCL]+[SoTienVon] AS Tong
FROM (4cQ_ChenhLechThuNhapChiPhi RIGHT JOIN tblKhachHang ON [4cQ_ChenhLechThuNhapChiPhi].MaKH = tblKhachHang.MaKH) LEFT JOIN 4eQ_VonCap12 ON tblKhachHang.MaKH = [4eQ_VonCap12].MaKH;