When typing out queries with derived tables auto completion is not finding columns. I am not sure the full scope of auto completion and if we implemented it to discover catalog info from parsing out derived tables. Below is an example of locally created user and tables with the query from a customer to replicate the customers issue. Is this implemented to work currently? If not should we implement auto completion from derived tables? Is this suppose to work and is a bug in the parser?
CREATE USER ALI IDENTIFIED BY VALUES 'aaaaaa'
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
GO
GRANT DBA TO ALI
GO
GRANT UNLIMITED TABLESPACE TO ALI
GO
CREATE TABLE HR.FG035 (
ID NUMBER(15,5) NULL,
CODFOR VARCHAR2(25) NULL,
CODPRO VARCHAR2(25) NULL,
Salary NUMBER(15,5) NULL)
GO
CREATE TABLE HR.fg010 (
ID NUMBER(15,5) NULL,
buyer VARCHAR2(25) NULL,
codpro VARCHAR2(25) NULL,
des VARCHAR2(25) NULL,
GR VARCHAR2(25) NULL,
FLAG5 VARCHAR2(25) NULL,
cedis NUMBER(15,5) NULL,
Salary NUMBER(15,5) NULL)
GO
CREATE TABLE ali.buyer (
ID NUMBER(15,5) NULL,
COD_BUYER VARCHAR2(25) NULL,
cognome VARCHAR2(25) NULL,
nome VARCHAR2(25) NULL)
GO
select a.buyer, b.cognome ||' ' || b.nome as buyer, a.codpro, a.des, m.multp, a.GR, a.FLAG5 as trOrd,
from (select CODPRO, count(*) as multp,
from (SELECT CODFOR, CODPRO FROM FG035 group by CODFOR, CODPRO) a
group by CODPRO
having count(*) > 1) m
inner join fg010 a on m.codpro = a.codpro
inner join ali.buyer b on a.buyer = b.COD_BUYER
where a.cedis = 1
@kin-hong: Was autocompletion designed to handle such a scenario?