> (select-dao 'foo-db-name (:in 'foo.id (:set (flatten (query "SELECT DISTINCT
> foo.id FROM foo_member INNER JOIN foo_show ON (foo_member.id =
> foo_show.member_id) INNER JOIN foo_series ON (foo_show.series_id =
> foo_series.id) WHERE foo_series.year = 2011
Ouch! You could express the IN test
Marijn,
Sorry to hide too much in the etc. It is relevant. Substituting for the etc:
(select-dao 'foo-db-name (:in 'foo.id (:set (flatten (query "SELECT
DISTINCT foo.id FROM foo_member INNER JOIN foo_show ON (foo_member.id =
foo_show.member_id) INNER JOIN foo_series ON (foo_show.series_id =
Hi Mitch,
> (select-dao 'foo-db-name (:in 'foo.id (:set (flatten (query "SELECT
> DISTINCT foo.id FROM foo, etc.")
I'm not quite sure what you are trying to achieve. Unless the 'etc'
was relevant, you seem to be selecting all ids from your foo table,
and then select only those rows in the foo
Here's one way I found to do this:
(select-dao 'foo-db-name (:in 'foo.id (:set (flatten (query "SELECT
DISTINCT foo.id FROM foo, etc.")
On 10/4/2010 11:39 AM, Mitch Berkson wrote:
> I'd like to retrieve fully populated DAOs based on a SQL string query -
> preferably without naming all the c