SQL Error (-294) : The column (tot_mes) must be in the GROUP BY list.
Posted in 2005
Topics: SQL Development & Query Writing
Hi all,
I need your help,
I have two servers with Windows2000 A.S., one on informix 9.30 and another
with 9.21.
My Query :
Select codcta,
a.tpomov,
sum(a.impmn1) Total,
max(coddiv) coddiv,
min('04') nromes,
min('2004') periodo,
(Select sum(cb_dmov.impmn1)
from cb_dmov
where cb_dmov.codcia = '2' andcb_dmov.coddiv like '00002' and
cb_dmov.periodo = '2004' and
cb_dmov.nromes <= '04' and
cb_dmov.codcta = a.codcta and
cb_dmov.tpomov = a.tpomov ) as Tot_Mes
From cb_dmov a
Where a.codcia = "2" and
coddiv like '00002' and
periodo = '2004' and
nromes <= '04'
Group by 1, a.tpomov
Order by 1, a.tpomov
I have a little problem, When I execute this sentence in Informix 9.30 Not
problem ! , but when i run on Informix 9.21 i get a following error :
SQL Error (-294) : The column (tot_mes) must be in the GROUP BY list.
Why run on 9.30 and not in 9.21 ?
Thanks a lot...
Omar.
Omar LUQUE Valdivia
Informix Database Administrator
Dirección de Telemática - Marina de Guerra del Perú
Av. La Marina Cdra. 36 s/n, La Perla - Callao, Lima - Peru
Telf : (511) 614-2900 (511) 562-3900 Ext. 2277 2265
E-mail : Luque001@marina.mil.pe
Cel. 9 639-7201
---------------------------------
Do You Yahoo!?
Todo lo que quieres saber de Estados Unidos, América Latina y el resto del
Mundo.
Visíta Yahoo! Noticias.