On 2/10/2010 8:46 AM, Mike M wrote:
>
> Yeah, I think what it boils down to is that the UserID = X filter needs to be 
> done *before* the join occurs. And I don't think that can happen without 
> using a subquery.
>    

That very well may be the case, but you may also be able to do it *in* 
the join.

Some people are not aware that the ON clause can be fairly sophisticated...

aTable LEFT OUTER JOIN bTable ON (aTable.key1 = bTable.key1 AND 
aTable.key2 = bTable.key2 AND aTable.aFilter = 'someValue')


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3280
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6

Reply via email to