Subject Re: [IBO] Ambiguous Field Name
Author Daniel Rail
Hi,

This has nothing to do with IBO. Read my comments below.

> Using FB 1.02 and IBO 4.2.Ib, I get the next error when trying order by
> 'PRONT' column. This happen if I'm not using a column name prefixed by
> tablename in Ordering Items.

[...snip...]

> All works well in case above. I remember I haven't this problem using
> Interbase 6.0X. I am not selecting any columns from table Clientes. It's
> used only to make a join.

> I think I found a bug. Does someone has some comments about this case?

Actually, it was a bug in IB 6 and it was fixed in FB 1(one year ago).
What happened was that when the tablename wasn't specified with the
fieldname, and that in the query the fieldname was found in 2 tables
that were being used, it happened that the field was taken from either
table when executing the query. Using your query as an example, the
field PRONT can be taken from either the table reflat or clientes, so
it was ambiguous. In your query, it would've have made any difference
in the execution of the query, because you are using an inner join on
that field and not using it in the where clause. But, it was possible
to get different results when the common field was not used in the
inner join, but in the where clause and/or order by clause.


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