SELECT a.RecID id, WorkCtr,a.Descr,a.Department,b.Department+' '+b.Descr AS DepartmentName,
a.IsActive,a.CreateUser,a.CreateTime,a.UpdateUser,a.UpdateTime from WorkCtrMaster a
LEFT JOIN DepartmentMaster b ON b.Department = a.Department AND b.Domain='{<UserFactoryNum>}'