invalid in the select list because it is not contained in either an aggregate function or the GROUP
Publicado por J@m (79 intervenciones) el 11/08/2011 16:55:17
como agrego a la consulta el campo RMT_CAIN, me genera el sigiente error:
Column 'cont_tras.rmt_cain' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
La consulta es la siguiente:
"SELECT RMT_CAIN, ref_prod, sum(cant_ing) as cant_tras FROM cont_tras where fec_est >='"&fec_ini&"' and fec_est <='"&fec_fin& "' group by ref_prod"
Gracias.
Cali - Colombia
Column 'cont_tras.rmt_cain' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
La consulta es la siguiente:
"SELECT RMT_CAIN, ref_prod, sum(cant_ing) as cant_tras FROM cont_tras where fec_est >='"&fec_ini&"' and fec_est <='"&fec_fin& "' group by ref_prod"
Gracias.
Cali - Colombia
Valora esta pregunta


0