Subject | RE: [IBO] Ambiguous field name? |
---|---|
Author | Helen Borrie |
Post date | 2002-11-05T04:20:23Z |
At 10:38 PM 04-11-02 -0500, you wrote:
Firebird is much more fussy about join ambiguities than is InterBase...and
Jason tightened up his parsers in IBO4 some long time ago to take account
of that. Hence, in the very old version of IBO that's behind Marathon, you
are not getting this client-side bug-checking on your join columns, whereas
in IBO 4 you are. Pointing to the *exact* cause of your ambiguity error
(which is coming from the database) is impossible without knowing what SQL
is actually going across the wire.
If LocationID is a participant in a key somewhere in your structures, then
I think that your SQL as you have it now is crook. You would have mixed
SQL-89 (implicit join) syntax with SQL-92 (explicit join) syntax, which is
highly NOT recommended in any conditions but particularly in IBO.
If LocationID is part of a key in the linking of these structures, then it
should be part of the JOIN criteria, not a WHERE criterion.
It would be interesting to see your KeyLinks but, without knowing what your
database linkages ought to be, it's all so many layers of guesswork. I
guess that's the trap in trying to suggest the sources of your errors
without being supplied with the full information about the problem.
Helen
>Hi Helen,It's hard to tell at the moment the exact cause of the ambiguity...but
>
>I still get the same message. I've modified my query to:
>
>Select mc.MenuCategoryID, mi.MenuItemID, mc.CategoryName, mi.ItemCode,
>mi.ItemName, mi.Price, mi.Sales
> >From xMenuCategory mc JOIN xMenuItem mi
>ON mc.MenuCategoryID = mi.MenuCategoryID
>Where (mc.LocationID = mi.LocationID)
>Order by mc.CategoryName, mi.ItemCode
>
>Assuming that there is a problem with my query, why does this query work in
>Marathon and not in my application? The only difference I can see is the
>IBO version.
Firebird is much more fussy about join ambiguities than is InterBase...and
Jason tightened up his parsers in IBO4 some long time ago to take account
of that. Hence, in the very old version of IBO that's behind Marathon, you
are not getting this client-side bug-checking on your join columns, whereas
in IBO 4 you are. Pointing to the *exact* cause of your ambiguity error
(which is coming from the database) is impossible without knowing what SQL
is actually going across the wire.
If LocationID is a participant in a key somewhere in your structures, then
I think that your SQL as you have it now is crook. You would have mixed
SQL-89 (implicit join) syntax with SQL-92 (explicit join) syntax, which is
highly NOT recommended in any conditions but particularly in IBO.
If LocationID is part of a key in the linking of these structures, then it
should be part of the JOIN criteria, not a WHERE criterion.
It would be interesting to see your KeyLinks but, without knowing what your
database linkages ought to be, it's all so many layers of guesswork. I
guess that's the trap in trying to suggest the sources of your errors
without being supplied with the full information about the problem.
Helen