Ver Mensaje Individual
  #5 (permalink)  
Antiguo 30/10/2013, 13:02
th3r0rn
 
Fecha de Ingreso: noviembre-2007
Mensajes: 504
Antigüedad: 16 años, 6 meses
Puntos: 2
Respuesta: Sumar valores de varias columnas en Join

Cita:
Iniciado por Libras Ver Mensaje
porque no estas agrupando todas tus columnas por eso....el erro que te aparece es que estas usando funciones de agregacion y cuando haces esto tienes que poner esas columnas en un group by, si te dice que te falta C.Trim ponla en tu group by del final y listo :)
Eso lo intente antes, pero me dio el siguiente error:
Código:
Msg 8120, Level 16, State 1, Line 1
Column 'C.Trim' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Msg 4104, Level 16, State 1, Line 17
The multi-part identifier "C.Trim" could not be bound.
Esto cuando al final le agrego:
Código SQL:
Ver original
  1. GROUP BY Id_Contenedor,Ancho,UAncho,A.TRIM,B.Descripcion,C.TRIM
Notese el C.Trim a lo ultimo...
Alguna sugerencia ? :(