On Jan 13, 2010, at 2:02 PM, Andrus Adamchik wrote:


paintings.exhibits.start > $date1 AND paintings.exhibits.name like 'X%'
OR
paintings.exhibits.start < $date2 AND paintings.exhibits.name like 'Y%'
OR
paintings.exhibits.start = $date3 AND paintings.exhibits.name like 'Z%'

here you can't describe the desired behavior with "|", but can with aliases:

 a.start > $date1 AND a.name like 'X%'
OR
 b.start < $date2 AND b.name like 'Y%'
OR
 c.start = $date3 AND c.name like 'Z%'

Wonder if that's a bad example though, as the intended result can be obtained without splits... Need to think of a better one. Although the idea is that there can be cases when exact control over joins is needed.

Andrus

Reply via email to