db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diego Zanga" <naar...@gmail.com>
Subject Group By - problems
Date Mon, 05 Feb 2007 21:31:39 GMT

I'm using a query developed for mysql.
actually it works with derby only IF there is NO <group by clienti.id>
select clienti.id , clienti.cognome , clienti.nome , clienti.display ,
clienti.idtitolo, wk7.descrizione , clienti.indirizzo , clienti.citta
, clienti.provincia , clienti.cap , clienti.idnazione,
wk13.description , clienti.pi , clienti.codfis ,
clienti.idlegalerappresentante, wk17.display , clienti.birthday ,
clienti.born_prov , clienti.born_city, wk21.codicearchivio ,
clienti.note , clienti.phone1 , clienti.phone2 , clienti.phone3 ,
clienti.home_phone , clienti.fax , clienti.mobile1 , clienti.mobile2 ,
clienti.email1 , clienti.email2 , clienti.email_pec , clienti.fido ,
clienti.esposizione , clienti.tariffa_oraria  from clienti left outer
join subcliente on clienti.id = subcliente.idcliente left outer join
pratiche as wk21 on wk21.id = subcliente.idpratica left join
legale_rappresentante_cliente as wk17 on  wk17.id =
clienti.idlegalerappresentante  left join nazione as wk13 on  wk13.id
= clienti.idnazione  , titoli as wk7  group by clienti.id  order by

the query is <developed> by an engine, and is one of the smallest :OP

the error is:
java.sql.SQLException: The SELECT list of a grouped query contains at
least one invalid expression. If a SELECT list has a GROUP BY, the
list may only contain valid grouping expressions and valid aggregate

I dont understand how the select could hold one invalid expression if
without the <group by> it works: there's even no aggregate expression,
so no <invalid> ones....

any idea?

cya, thx
Diego Zanga

View raw message