cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Sebastien Koechlin I-VISION)
Subject <sql:count-attribute>
Date Thu, 18 May 2000 13:41:25 GMT
I have problems with sqltaglib and <sql:count-attribute>,

My query looks like :
	SELECT DISTINCT firstname, lastname FROM status;

to count rows, I think this query is translated into:
	SELECT COUNT(distinct firstname) FROM emp;

which is wrong, 
	Oracle return the wrong result 
	and Postgresql an error.

This query does not work either with postgresql:
	SELECT firstname FROM emp ORDER BY firstname;

	SELECT COUNT(firstname) FROM emp ORDER BY firstname;
does : "Illegal use of aggregates or non-group column in target list",
order by shouldn't be used.

This last one does not work too:
	SELECT emp.*;

but it's not a well writen query.

Sebastien Koechlin

View raw message