You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Eric Pugh <ep...@upstate.com> on 2002/05/09 20:27:26 UTC

How do I do a correlated subquery in T2.1's Torque?

Hi all,

I wanted to be able to do this:
select * from reaction where reaction_id not in(select reaction_id from
well)

How do you do a not in() with a select statement vesus just a bunch of
values?

I'm guessing the Criteria.CUSTOM would work, but is there a better way?

Eric


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: How do I do a correlated subquery in T2.1's Torque?

Posted by Eric Pugh <ep...@upstate.com>.
Thanks,

I ended up using that, and then realized that my need for this weird query
was becase of bad DB design, and fixed that instead!

Eric

-----Original Message-----
From: Eric Dobbs [mailto:eric@dobbse.net]
Sent: Monday, May 13, 2002 3:17 PM
To: Turbine Users List
Subject: Re: How do I do a correlated subquery in T2.1's Torque?


On Thursday, May 9, 2002, at 12:27  PM, Eric Pugh wrote:

> I wanted to be able to do this:
> select * from reaction where reaction_id not in(select reaction_id from
> well)
>
> How do you do a not in() with a select statement vesus just a bunch of
> values?
>
> I'm guessing the Criteria.CUSTOM would work, but is there a better way?

I think Criteria.CUSTOM is your only option in this case.

-Eric

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How do I do a correlated subquery in T2.1's Torque?

Posted by Eric Dobbs <er...@dobbse.net>.
On Thursday, May 9, 2002, at 12:27  PM, Eric Pugh wrote:

> I wanted to be able to do this:
> select * from reaction where reaction_id not in(select reaction_id from
> well)
>
> How do you do a not in() with a select statement vesus just a bunch of
> values?
>
> I'm guessing the Criteria.CUSTOM would work, but is there a better way?

I think Criteria.CUSTOM is your only option in this case.

-Eric

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>