|Subject||[IBO] Re: Ambiguous field name between tables ...|
>I'm not familiar with the use of the colon in sql, but the line,No Jack, colon is just the way you tell IBO that it is a parameter.
>WHERE CO.CD = :CD, bothers me. Should not :CD be, perhaps, :EU.CD?
FROM EMPR_USU EU
JOIN CORR CO
ON CO.CORR_ID = EU.CORR_ID
WHERE CO.CD = :CD
AND EXISTS ( SELECT 1
WHERE PJ.CORR_ID = CO.CORR_ID )
you call your query like this:
IB_Query1.ParamByName('ID').AsInteger:=1; //or another value
Parameters are very useful and you can save a lot of time not having
to reprepare the query if their value change.