Subject Re: [ib-support] Ambiguous field name
Author Daniel Rail
At 13/09/2002 09:28 PM, you wrote:
> > Guido,
> > I think you need to get an update to IBReplicator. The one you got
> > out-of-the-box with IB 6.x will be much older than the ambiguity fixes
> in FB 1.
> >
>
>I have the latest version you can download from the IBReplicator webside.
>But why
>do I get this error, when the bug is fixed ?

The error message that you describe has been introduced in FB 1.0. There's
is a better check as to where fields are coming from in a query.

Example:
SELECT CLIENTNO, INVOICENO, COMPANYNO
FROM ORDERS
JOIN CLIENTS ON CLIENTS.COMPANYNO=ORDERS.COMPANYNO
Note: CLIENTNO exists in both tables.

The above query wouldn't have given an error in the versions before FB 1.0
beta2. But, the extra check was introduced in FB 1.0 beta 2 to make sure
that the user specifies exactly from which table the fields are coming
from. In the above query, can you tell from which table the field CLIENTNO
gets its values? The issue was that no one knew and even Firebird didn't
know, because the result could vary from one query to the other. Hence the
ambiguity bug. This is one of the reasons that IBConsole from Borland
can't be used with Firebird 1.0.


Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)