Wrong SQL with fast query builder
rodrigo7
Brasil
Why fast query builder made wrong sql?
Look this example:
SELECT F.FUNNOM, F.FUNEND, F.FUNCID, F.FUNCPF, F2.NOME_FILIAL, F2.CNPJ_CPF, F3.DEPNOM
FROM
FO_FUNCIONARIOS_DM F1
INNER JOIN FO_FUNCIONARIOS F ON (F1.ID_FUNCIONARIO=F.ID_FUNCIONARIO)
INNER JOIN FILIAIS F2 ON (F.ID_FILIAL=F2.ID_FILIAL)
INNER JOIN FO_FUNCIONARIOS_DM F1 ON (F3.DEPCOD=F1.FUNDEP),
FO_DEPARTAMENTOS F3
If I try do see result set the message "alias F1 conflicts with an alias in the same statement"
Look this example:
SELECT F.FUNNOM, F.FUNEND, F.FUNCID, F.FUNCPF, F2.NOME_FILIAL, F2.CNPJ_CPF, F3.DEPNOM
FROM
FO_FUNCIONARIOS_DM F1
INNER JOIN FO_FUNCIONARIOS F ON (F1.ID_FUNCIONARIO=F.ID_FUNCIONARIO)
INNER JOIN FILIAIS F2 ON (F.ID_FILIAL=F2.ID_FILIAL)
INNER JOIN FO_FUNCIONARIOS_DM F1 ON (F3.DEPCOD=F1.FUNDEP),
FO_DEPARTAMENTOS F3
If I try do see result set the message "alias F1 conflicts with an alias in the same statement"