There are about 400,500 (all distinct) records in one table and about 370,000 (about 315 distinct) in the other. I know there are about 70,000 that truly do not match. But there are more (most) if I do not pad the zeroes in employeenumber0. Before I did this, there were about 700,000 rows in the outer join, presumably because some rows were counted both times, from the right column and the left. After padding the zeroes, I am getting about 403,000, presumably more of them matching, but still counting the left and the right. But I also noticed in the results, some were matching anyway, so my whole logic is in question. Here is some data:EmployeeNumber0 EmplID PaddedEmp1006270 00001006270 000010062701006271 00001006271 000010062711006272 00001006272 000010062721006273 00001006273 000010062731006275 00001006275 000010062751006276 00001006276 000010062761006277 00001006277 000010062771006278 00001006278 000010062781006279 00001006279 00001006279
And here is the SQL:SELECT EmployeeNumber0, EmplID, RIGHT ('00000000000'+ CAST (employeeNumber0 AS varchar), 11) PaddedEmpFROM _sde.v_HR_NSVFULL OUTER JOIN dbo.v_R_UserON RIGHT ('00000000000'+ CAST (employeeNumber0 AS varchar), 11) = EMPLIDGROUP BY employeeNumber0, EMPLIDORDER BY employeeNumber0, EMPLIDThe grouping is because there are some duplicate employeenumber0 columns. Thank you for any suggestions here.Duane