Código SQL:
Ver originalCREATE TABLE #temp
(
dato1 INT,
dato2 VARCHAR(20),
dato3 VARCHAR(20)
)
INSERT INTO #temp VALUES (1,'a','a')
INSERT INTO #temp VALUES (1,'a','a')
INSERT INTO #temp VALUES (1,'a','a')
INSERT INTO #temp VALUES (2,'b','b')
INSERT INTO #temp VALUES (2,'b','b')
INSERT INTO #temp VALUES (2,'b','b')
SELECT dato1,dato2,dato3 FROM(
SELECT ROW_NUMBER() OVER(partition BY dato1 ORDER BY dato1) AS rn, dato1,dato2,dato3 FROM #temp
) t1 WHERE rn=1
sin group by, usando row_number......