Ver Mensaje Individual
  #2 (permalink)  
Antiguo 31/01/2013, 15:55
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Script de Migración - Ignorar PK Repetida

si puedes hacer algo asi

select * from tabla group by id having count(id)=1

select * from(
select row_number() over (partition by id order by id) as rn, * from tabla
) as t1 where rn=1

saludos!
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me