Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/12/2008, 09:00
proteus8
 
Fecha de Ingreso: junio-2008
Ubicación: Osorno
Mensajes: 155
Antigüedad: 16 años, 8 meses
Puntos: 3
Pregunta Ayuda con group by

Hola a todos, mi problema es el siguiente: hago una caonsulta SQL a dos tablas a la ves coon el siguiente script

SELECT A.NOINS,A.DESCRIPTION, A.IDCLIENT,B.DATETIME
FROM TOPOLOGY A ,LASTREAD B
where A.DESCRIPTION='variable1'
AND A.NOINS=B.NOINS

y los resultados que me entrega son los siguientes
NOINS - DESCRIPTION - IDCLIENT - DATETIME
43029400 - TOTALIZADOR1 - SO43029400 - 2008-12-09
43029401 - TOTALIZADOR2 - SO43029400 - 2008-12-09

pero quiero que queden agrupados por el campo "IDCLIENT" pero no se como hacerlo, lo intente con un Group By pero me da el siguiente error:

"Msg 8120, Level 16, State 1, Line 1
Column 'TOPOLOGY.NOINS' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause"


por favor ayundeme!!!