如果僱員採取離開數據示SSRS顯示基本信息
所需的輸出
但在給定的,如果另一個僱員沒有采取離開基本信息應顯示字段
我想基本信息字段來填充他是否需要離開與否
這是查詢
select LeaveRequest.LeaveRequestID,LeaveRequest.EmployeeID,userName,departmentName,designationName,RequestDate
,IsApproved,ApprovedDate,StartDate,EndDate,Name,PartOFDay
fromLeaveRequest
inner join LeaveType
on LeaveRequest.TypeID=LeaveType.TypeID
inner join LeaveRequestDetails
on LeaveRequest.LeaveRequestID=LeaveRequestDetails.LEaveRequestID
inner join EmployeeInformation
on LeaveRequest.EmployeeID=EmployeeInformation.employeeID
inner join Departments
on Departments.departmentID=EmployeeInformation.departmentID
inner join Designations
on Designations.designationID=EmployeeInformation.designationID
where [email protected]**
作爲很好的做法,我總是包含將始終存在,在這種情況下,您EmployeeInformation表中的數據表開始。然後做LEFT加入可能有或沒有相關數據的表格。我發現可視化要簡單得多。 –