On 3/9/2016 9:58 AM, R Smith wrote: > On 2016/03/09 4:35 PM, Igor Tandetnik wrote: >> Yes, but why is that a problem? It is perfectly legal, and often >> useful, for a subquery to refer to columns from enclosing query. >> That's what makes it a *correlated* subquery. > > True, but the OP's result is still in error.
Yes, I realize that. I was only arguing against the proposition that the query is syntactically invalid and should have been rejected on these grounds. -- Igor Tandetnik