This?--structuredeclare @Table1 table (Name varchar(10), Found bit, code char(2), Description varchar(50))declare @Table2 table (Name varchar(10), Found bit, code char(2), Description varchar(50))--/--datainsert @Table1 select 'test4', Null, 'BB', NULLunion all select 'test4', 1, Null, Nullunion all select Null, 0, 'TS', 'Computer'insert @Table2 select 'test6', 0, 'BB', Nullunion all select 'test6', 0, 'CC', Nullunion all select 'test4', 1, 'BB', Nullunion all select 'test4', 1, 'CC', NULLunion all select 'TEST2', 1, 'CC', NULLunion all select 'TEST1', NULL, 'CC', NULLunion all select 'TEST8', 0, 'TS', 'Computer'--/--calculationselect isnull(a.Name, b.Name) as Name, isnull(a.Found, b.Found) as Found, isnull(a.code, b.code) as code, isnull(a.Description, b.Description) as Descriptionfrom @Table1 a inner join @Table2 b on (a.Name = b.Name or a.Name is null or b.Name is null) and (a.Found = b.Found or a.Found is null or b.Found is null) and (a.code = b.code or a.code is null or b.code is null)--/
Ryan Randall - Yak of all tradesSolutions are easy. Understanding the problem, now, that's the hard part.