I tried to do this internal join in SQL to link two tables in my report.
What I would be doing wrong, why is giving "Unknown ffccf column", even though I am naming the column?
Follow the code:
SELECT finafim.ccf as ffccf, finafim.impcaixa, finafim.numcup, finafim.vlfina, finafim.descfina,
tabc470.ccf as t4ccf, tabc470.NSerie, tabc470.numcupom
FROM finafim
INNER JOIN tabc470
ON (finafim.numcup = tabc470.numcupom)
AND (finafim.ccf = tabc470.ccf)
AND (finafim.impcaixa = tabc470.NSerie)
WHERE ffccf= :ppccf AND numcup= :ppcoo AND impcaixa= :ppecf //Detalhes de parâmetros para igualar valores.
AND dtcomp BETWEEN "2014/03/01" AND "2014/05/01"