Select ve.Branch,count(ve.ID) 'No of Available Employees ' from [22.214.171.124].HumanResources.dbo.vwEmployee ve left join [126.96.36.199].HumanResources.dbo.vwBranch vb on ve.branch=vb.Name where ve.leavingdate is null group by ve.branch order by ve.Branch Select D.Branch,D.Employees 'No of Registered Employees' from (select A.Branch,count(A.EmployeeID)'Employees' from (select E.EmployeeID,E.Firstname,E.Lastname,B.Branch from dbo.tblEmployee E left join dbo.tblBranch B on E.BranchID=B.BranchID left join [188.8.131.52].HumanResources.dbo.vwEmployee VE on E.EmployeeID =VE.ID where VE.LeavingDate is null )A group by A.Branch )D order by D.Branch
|SQL Server R2 Stored procedure performance||8||42|
|order a table based on column relationship (parent-child), can it be done?||4||41|
|Supress rows in SSRS table based on Like or Soundex||2||39|
|Updating a table from a temp table||4||25|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
9 Experts available now in Live!