db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Burschik" <Bursc...@lotto-berlin.de>
Subject RE: Can I do this with Criteria?
Date Thu, 08 Apr 2004 16:02:47 GMT
Now, you might think I don't really need the alias feature, but that is
because I made a slight mistake in my example. What I actually need to do is

  select t1.something from TABLE as t1, TABLE as t2
    where t1.id=t2.id
    and t1.value=somevalue
    and t2.value=someothervalue

You see, I use the same table more than once in order to avoid sub-selects.

Since I wasn't able to figure out a way to do this with Criteria, I tried to
do without by piecing together an SQL statement and using the Torque
connection to submit it to the database. Strangely enough, the select took
very long to complete (something like three minutes) and the result was not
correct, although the same statement typed at the command prompt (mysql) was
blindingly fast and delivered the correct results. Can anyone suggest a
reason for this behaviour?


Michael Burschik

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message