Re: Flaky MySQL?
David Wynter wrote:
> Knock yourself out. Thing is that it is not clear
> from the MySQL user manual that a sub query is a
> valid cond_expr in a OUTER LEFT JOIN. But the fact
> it works some of the time and not others dependent
> on the order in the statement then it is fair game
Ok, i agree, but when the condition does not relate both tables (i mean literally "apply a relational operator using an argument from the one and from the other table referenced in the JOIN clause"), i would not call it a 'join' condition, i would call it just: 'condition'. I've seen this 'condition' type of usage in some sections of the ANSI 9075:1999 spec, but i never write them in the ON, i write these in the WHERE.
> as far as I am concered. Also outer joining to the
> most recent record bar the current in a timeseries
> is a reasonably common thing to require, and I
> don't know any other way of doing it ;).
Sorry, you lost me there. What's that most recent record bar? please post a line of code to explain.
> You can move the restrictions in the ON part of
> the clause into the WHERE clause in response to
> your second to last post in this thread. But not
> logically for on OUTER JOIN as far as I can see.
Yeah, but, does the query work as desired when you do move them to the WHERE? Please tell, Im genuinly interested (although i do agree this usage should work consistently in all cases, so either always fail, or always succeed).