CoffeeK1d
Member²
I found that the code assistant is not displaying results based on the current scope of the alias, but based on when the alias was first used.
In the sample code below X was assigned to DUAL in the CTE but is not being used. The same alias X is being used in the main query, pointing to a different table. The main query code assistant is displaying results for DUAL, which is out of scope.

In the sample code below X was assigned to DUAL in the CTE but is not being used. The same alias X is being used in the main query, pointing to a different table. The main query code assistant is displaying results for DUAL, which is out of scope.
SQL:
WITH temp1 AS
(SELECT USER AS db_user
,SYSDATE AS db_sysdate
FROM dual x)
SELECT x.* FROM jgust.t_application x;
