The next query runs well on FireDAC but UniDAC detects an ambiguous field name between tables BUDGETS_SLS and BDG_SLS_STATES on-field ID_BDG_SLS.
As you can see the query is unambiguous through the use of ALIAS.
I've sent a support request, but while the Devart team solves it I need a workaround.
Can anyone help me I can't imagine this query without LEFT JOINs.
Thank you.
Code: Select all
SELECT BDG.ID_BDG_SLS ,
BDG.CD_SERIES ,
BDG.NM_BDG_SLS ,
STS.DTT_CHANGE ,
STS.CD_DOC_STATE,
DST.DS_DOC_STATE,
STS.CD_USER
FROM [b]BDG_SLS_STATES STS[/b]
LEFT JOIN BUDGETS_SLS BDG ON STS.ID_BDG_SLS = BDG.ID_BDG_SLS
LEFT JOIN [b]DOC_STATES DST[/b] ON DST.CD_DOC_STATE = STS.CD_DOC_STATE
WHERE BDG.ID_BDG_SLS = :ID_BDG_SLS
ORDER BY BDG.CD_SERIES, BDG.NM_BDG_SLS, STS.DTT_CHANGE