GROUP BY problem with 6.5

Поиск
Список
Период
Сортировка
От Tamas Nyitrai
Тема GROUP BY problem with 6.5
Дата
Msg-id Pine.LNX.4.10.9907050257320.435-100000@defiant.telnet.hu
обсуждение исходный текст
Список pgsql-general
Hello!

I am using PostgreSQL 6.5 on a Debian/Linux 2.2 system. It all seems to
be just fine, but I have got into a problem with GROUP BY.

I have a query which worked OK until now (with all the previous versions
of PostgreSQL) but now it returns the following error message:

'Illegal use of aggregates or non-group column in target list'

So what has been changed at GROUP BY in 6.5?


Here is the whole query if you wish to take a look at it:

SELECT szl.*, sz.szaml_cim, sz.szaml_varos, sz.szaml_irsz, sz.szamlnev,
sz.programcsomagid, p.tulajdonosid
FROM dijbefizetesek szl, szerzodesek sz, programcsomagok p
WHERE (sz.szerzodesid = szl.szerzodesid)
AND (p.p_azonosito = sz.programcsomagid) AND (szl.osszeg > 0)
AND (szl.trdate >= 19990531) AND (szl.trdate <= 19990531)
AND (szl.trnum >= 1) AND (szl.trnum <= 1000) GROUP BY trdate, trnum


Thanking you in advance!

Regards,
Tamas

(If you have an answer for me, could cc it to my private address as well?
Thank you!)


В списке pgsql-general по дате отправления:

Предыдущее
От: Astro Monk
Дата:
Сообщение: docs where?
Следующее
От: Tamas Nyitrai
Дата:
Сообщение: GROUP BY problem with 6.5