You should know this after 172 posts!-- Create sample dataDECLARE @Mst_Employee TABLE (Empid int, EmpName Varchar(48))INSERT @Mst_Employee (Empid, EmpName)SELECT 1, 'Dana' UNION ALLSELECT 2, 'sekar' UNION ALLSELECT 3, 'Karti'DECLARE @Mst_Report TABLE (Processid int, Processdoneby int, Resetby int)INSERT @Mst_Report (Processid, Processdoneby, Resetby)SELECT 1, 2, 1 UNION ALLSELECT 2, 1, 2 UNION ALLSELECT 3, 3, 1DECLARE @Mst_Process TABLE (Processid int, ProcessName varchar(50))INSERT @Mst_Process (Processid, ProcessName)SELECT 1, 'Printing' UNION ALLSELECT 2, 'Scanning'-- Do the simple workSELECT r.ProcessID, p.ProcessName, pe.EmpName AS ProcessDoneBy, re.EmpName AS ProcessResetByFROM @Mst_Report AS rINNER JOIN @Mst_Process AS p ON p.ProcessID = r.ProcessIDINNER JOIN @Mst_Employee AS pe ON pe.EmpID = r.ProcessDoneByINNER JOIN @Mst_Employee AS re ON re.EmpID = r.ResetBy
Peter LarssonHelsingborg, Sweden