Good Morning Guys,
I'm having a problem with oRS:Requery(). I have the SQL statment bellow:
When I do:
everything is ok, But when I do:
There is happehing this error:
I observed that in the error message, WHERE condition is different . Is missing field's ALIAS. Do you know why is it happening ?
I'm having a problem with oRS:Requery(). I have the SQL statment bellow:
cSql := " SELECT mps.*,pes.nome FROM tmovgpes AS mps LEFT JOIN tpessoal AS pes ON mps.cmat=pes.cmat WHERE mps.data = ? AND mps.cequipto = ? AND mps.nequipe = ? ORDER BY funcao"When I do:
oRs := oBD:Query( cSql, {dDataAtual,aVeiculos[1,1],aVeiculos[1,9]} )everything is ok, But when I do:
oRs:Requery({dDataAtual, oQryMvg:cequipto,oQryMvg:nequipe})There is happehing this error:
SELECT mps.*,pes.nome FROM tmovgpes AS mps LEFT JOIN tpessoal AS pes ON mps.cmat=pes.cmat WHERE data = '2022-04-07' AND cequipto = '00001' AND nequipe = 7 ORDER BY funcao;SHOW FULL COLUMNS FROM tmovgpes [ ERROR: Column 'cequipto' in where clause is ambiguous ]I observed that in the error message, WHERE condition is different . Is missing field's ALIAS. Do you know why is it happening ?
