I think this would give you unpredictable results.
I think you might be looking for a group by and a having clause.
 
select table1.masterId, count (*) from table1 left join table2 on (....)
group by table1.masterID having count (*) <= 10
 
This would give you a list of masterid with 10 or fewer rows in table2.
 
Troy 
 
 
 -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Alan Wolfe
Sent: Monday, October 13, 2003 3:54 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - count with multiple tables

hello i was wondering about using count in selects that involve multiple tables.
 
if i have something like this:
 
select * from
table1 left join table2
on (clause here)
and count > 0
and count <= 10
 
which table does it get the count from?
 
is it table1, table2 or is it the number of results that it returns?
 
TIA,
Alan

Reply via email to