Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/10/2012, 22:33
ioa51
 
Fecha de Ingreso: octubre-2012
Mensajes: 7
Antigüedad: 11 años, 7 meses
Puntos: 0
Respuesta: Consulta sql server

Me funciono!!! gracias GeriReshef , me soluciono el problema. Solo el simple detalle de que queria cada valor en su propio espacio (sin comas) asi:


WITH T AS
(SELECT Row_Number() Over(Partition BY nombre ORDER BY id) Nm,
*
FROM TABLE1)
SELECT nombre,
IsNull(Max(Case When Nm=1 Then Cast(Valor AS Varchar) End),'-'),
IsNull(Max(Case When Nm=2 Then Cast(Valor AS Varchar) End),'-'),
IsNull(Max(Case When Nm=3 Then Cast(Valor AS Varchar) End),'-')
FROM T
GROUP BY nombre;


GRACIAS.