Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/10/2008, 16:44
chan
 
Fecha de Ingreso: abril-2005
Mensajes: 182
Antigüedad: 19 años, 1 mes
Puntos: 1
Respuesta: No se como eliminar los duplicados en esta consulta

Probe con el sql que me pasaste y me dio este error

Código:
Server: Msg 8120, Level 16, State 1, Line 1
Column 'locales.nombre' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Server: Msg 8120, Level 16, State 1, Line 1
Column 'categorias.grupo' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Server: Msg 8120, Level 16, State 1, Line 1
Column 'categorias.nombre' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Si le saco el group by funciona bien pero me trae registros duplicados, por ejemplo el local GARBARINO aparece tres veces, uno por la categoria Electrónica, uno por la categoría Electrodomésticos y otro por la categoría Informática...