SELECT Name, MAX(Col1), MAX(Col2) FROM MyTable GROUP BY Name
select A.name,A.col1,(select col2 from table B where A.name = B.name and col2 !=null) from table A where col1 != null
SELECT Name, SUM((ISNULL(Col1, 0))) AS Col1, SUM((ISNULL(Col2, 0))) AS Col2 FROM TEMP GROUP BY Name
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)