Problems with subquery, field doesn't exist, but advantage is giving me results

孤街浪徒 提交于 2019-12-02 01:30:10

This is not a bug. It is working correctly.

The OlwArtnr in the subquery, when not fully qualified, resolves to the OlwArtnr column in the parent query. Unqualified column in the subquery is resolved using the table in the subquery first. If it is not one of the columns from the tables in the subquery, it will go to the parent query, using the tables in the parent query. This process continues up the chain until either the column resolves to a table or an error is generated.

You will get the same with SQLServer or other database.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!