db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remke Rutgers <Remke.Rutg...@brightalley.nl>
Subject IN clause capable of adding a subquery?
Date Mon, 16 Dec 2002 13:36:50 GMT
Hi developers,

As far as I can tell, it is not possible to construct an IN clause with a
subquery using Torque.
I would like to be able to construct a query of the following form:
(just a simple example)

SELECT * FROM employees
WHERE employerid IN (
	SELECT id FROM employers
	WHERE country='USA'
)

I can achieve the desired result in the following way:
- first create the subquery
- retrieve the result list
- use the result list in the IN criteria for the outer query.

The number of elements in the IN clause is limited in Oracle however, so I
want to use a subquery instead of an explicit list.

Does it seem like a good enhancement to have a subquery construct for the
IN-clause?

Remke Rutgers
Technisch Consultant Knowledge & Learning

Bright Alley Knowledge & Learning
Media Park - Sumatralaan 45
Postbus 10 - 1200 JB Hilversum
Web www.brightalley.com
Telefoon direct (035) 6775668
Fax (035) 6774355
E-mail remke.rutgers@brightalley.nl
 

Mime
View raw message