db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Kusch" <pa...@icecentric.com>
Subject Re: Select Distinct
Date Fri, 23 May 2003 20:11:50 GMT
If I remember well you have to use XXXPeer.doPSSelect(criteria) instead of
doSelect

With regards,

Pavel Kusch

----- Original Message -----
From: "Ronny Walter" <mailinglists@freenet.de>
To: <torque-user@db.apache.org>
Sent: Friday, May 23, 2003 3:03 PM
Subject: Select Distinct


> Hello list,
>
> i have a little problem with torque:
>
> My Code looks like this:
>
> Criteria criteria = new Criteria();
> criteria.addAscendingOrderByColumn(ContentPeer.PROVIDER);
> criteria.setDistinct();
> Log.debug("SQL for getProviders: " +
> ContentPeer.createQueryString(criteria));
> return doSelect(criteria);
>
> The logfile says:
>
> [23 Mai 2003 21:53:05 DEBUG] - SQL for getProviders: SELECT DISTINCT
> content.PROVIDER FROM  ORDER BY content.PROVIDER ASC
>
> The problem is, that this SQL-Statement is incorrect. Where is the
> tablename?
> But I get Results with this statement, but the distinct doesn't work.
>
> The table looks like this:
>
> Id provider topic link
> 1 Test hello http
> 2 Test hello2 ftp
> 3 MyTest hello ssh
>
> I want the following resultset:
> Test
> MyTest
>
> But I get:
>
> Test
> Test
> MyTest
>
>
> What's wrong?
>
> Thanks for any help.
>
> Ronny
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message