Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.
select DISTINCT e.EmployeeID, es.EmployeeStatus AS Status, e.EmployeeDescNoID AS Emp_Name, e.WindowsUserName AS LoginID, e.DisplayEmployeeID AS UserID, e.ExtNoUD AS Extension, e.FFWMobileUD AS FFWMobile, e.WorkEmail AS Email, -- profitcentre -- department e.EliteNoUD AS SectionNumber, e.SecretaryNameUD AS Secretary, e.LocationUD AS Location, ej.PostID AS Position FROM [Cascade].dbo.Employee e JOIN [Cascade].dbo.EmployeeJobs ej ON e.EmployeeID = ej.EmployeeID JOIN [Cascade].dbo.Employee_Status es ON e.EmployeeID = es.EmployeeID LEFT OUTER JOIN (select t1.JobTitle, t1.EmployeeID from [Cascade].dbo.EmployeeJobs t1 join (select employeeId, min(Sequence) as sequence from [Cascade].dbo.EmployeeJobs group by employeeID ) t2 on t1.employeeid = t2.employeeID and t1.Sequence = t2.Sequence ) ej1 ON e.EmployeeID = ej1.EmployeeID WHERE es.EmployeeStatus = 'Current' --AND (MIN(ej.SEQUENCE))
Restore recent download of AdventureWorksDW2016CTP3.b
|Microsoft SQL Server 2016 -- RECOMMENDED "backup" SOLUTION, INJECTION attack notification ?||1||45|
|The duplicate key value is (<NULL>)||14||44|
|Group by and order by clause||28||36|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
17 Experts available now in Live!