For some reason, I now can include the date range search in my ON (...) clause.
However I would like to know if there is a limit to the number ofconditions I can put. It seems that more than 2 conditions misses somerecords.