Skip to Content
Former Member
Jun 30, 2009 at 08:16 PM

Subquery that the database engine runs


I have a simple query

select col_a, col_b from table_a where col_a in (select col_a from table_c

group by col_a having count(*) > 5)

How can I get CR 2008 to allow a subquery?

If you create a database command, you can get the query to work, but a SQL statement is executed once for every row returned by the subquery. Obviously, this is not acceptable for large datasets. In need to be able to generate a single query by the database engine.

Can some one teach me how to write a subquery with CR 2008?