Subject RE: [IBO] Ambiguous field name?
Author Steve Harp
No affect. I still get the same error.

-----Original Message-----
From: Daniel Rail [mailto:daniel@...]
Sent: Tuesday, November 05, 2002 3:35 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] Ambiguous field name?


What about not using aliases in your query and simply use xMenuCategory and
xMenuItem, instead of mc and mi. Try that to see if there is a change.

Daniel Rail

At 05/11/2002 04:08 PM, you wrote:
>That change had no effect but here's the new monitor output. IBO is adding
>an ambiguous (LocationID = 2).
>
>/*---
>PREPARE STATEMENT
>TR_HANDLE = 16342000
>STMT_HANDLE = 22102444
>
>Select mc.MenuCategoryID, mi.MenuItemID, mc.CategoryName, mi.ItemCode,
>mi.ItemName, mi.Price, mi.Sales
> , XMENUITEM.RDB$DB_KEY
> From xMenuCategory mc JOIN xMenuItem mi
>ON (mc.MenuCategoryID = mi.MenuCategoryID)
>Where (mc.LocationID = 2)
>and (mi.LocationID = 2)
>ORDER BY mc.CategoryName ASC
> , mi.ItemCode ASC
>
>PLAN SORT (JOIN (MC INDEX (RDB$FOREIGN16),MI INDEX (RDB$FOREIGN17)))
>
>FIELDS = [ Version 1 SQLd 8 SQLn 59
> XMENUCATEGORY.MENUCATEGORYID = <NIL>
> XMENUITEM.MENUITEMID = <NIL>
> XMENUCATEGORY.CATEGORYNAME = <NIL>
> XMENUITEM.ITEMCODE = <NIL>
> XMENUITEM.ITEMNAME = <NIL>
> XMENUITEM.PRICE = <NIL>
> XMENUITEM.SALES = <NIL>
> XMENUITEM.DB_KEY = <NIL> ]
>
>SECONDS = 0.010
>----*/
>/*---
>PREPARE STATEMENT
>TR_HANDLE = 16342000
>STMT_HANDLE = 22102444
>
>Select mc.MenuCategoryID, mi.MenuItemID, mc.CategoryName, mi.ItemCode,
>mi.ItemName, mi.Price, mi.Sales
> , XMENUITEM.RDB$DB_KEY
> From xMenuCategory mc JOIN xMenuItem mi
>ON (mc.MenuCategoryID = mi.MenuCategoryID)
>Where (mc.LocationID = 2)
>and (mi.LocationID = 2)
> AND (LocationID = 2)
>ORDER BY mc.CategoryName ASC
> , mi.ItemCode ASC
>
>FIELDS = [ Version 1 SQLd 8 SQLn 59
> XMENUCATEGORY.MENUCATEGORYID = <NIL>
> XMENUITEM.MENUITEMID = <NIL>
> XMENUCATEGORY.CATEGORYNAME = <NIL>
> XMENUITEM.ITEMCODE = <NIL>
> XMENUITEM.ITEMNAME = <NIL>
> XMENUITEM.PRICE = <NIL>
> XMENUITEM.SALES = <NIL>
> XMENUITEM.DB_KEY = <NIL> ]
>
>ERRCODE = 335544569
>----*/
>/*---
>PREPARE STATEMENT
>TR_HANDLE = 16342000
>STMT_HANDLE = 22102444
>
>Select mc.MenuCategoryID, mi.MenuItemID, mc.CategoryName, mi.ItemCode,
>mi.ItemName, mi.Price, mi.Sales
> , XMENUITEM.RDB$DB_KEY
> From xMenuCategory mc JOIN xMenuItem mi
>ON (mc.MenuCategoryID = mi.MenuCategoryID)
>Where (mc.LocationID = 2)
>and (mi.LocationID = 2)
> AND (LocationID = 2)
>ORDER BY mc.CategoryName ASC
> , mi.ItemCode ASC
>
>FIELDS = [ Version 1 SQLd 8 SQLn 59
> XMENUCATEGORY.MENUCATEGORYID = <NIL>
> XMENUITEM.MENUITEMID = <NIL>
> XMENUCATEGORY.CATEGORYNAME = <NIL>
> XMENUITEM.ITEMCODE = <NIL>
> XMENUITEM.ITEMNAME = <NIL>
> XMENUITEM.PRICE = <NIL>
> XMENUITEM.SALES = <NIL>
> XMENUITEM.DB_KEY = <NIL> ]
>
>ERRCODE = 335544569
>----*/
>/*---
>INTERPRETE BUFFER =
>
>SECONDS = 0.010
>
>ERRCODE = 17
>----*/
>/*---
>INTERPRETE BUFFER = Dynamic SQL Error
>
>ERRCODE = 21
>----*/
>/*---
>INTERPRETE BUFFER = SQL error code = -204
>
>ERRCODE = 69
>----*/
>/*---
>INTERPRETE BUFFER = Ambiguous field name between table XMENUCATEGORY and
>table XMENUITEM
>
>ERRCODE = 10
>----*/
>/*---
>INTERPRETE BUFFER = LOCATIONID
>
>ERRCODE = -1
>----*/
>
>-----Original Message-----
>From: Daniel Rail [mailto:daniel@...]
>Sent: Tuesday, November 05, 2002 2:38 PM
>To: IBObjects@yahoogroups.com
>Subject: RE: [IBO] Ambiguous field name?
>
>
>At 05/11/2002 02:59 PM, you wrote:
> >I'm confused. My query doesn't have a WHERE clause in it. How can I fix
> >this? This is what I'm sending.
> >
> >*************************************************
> >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)
> >and (mc.LocationID = 2)
> >and (mi.LocationID = 2)
> >ORDER BY mc.CategoryName, mi.ItemCode
> >*************************************************
>
>Change the 2 lines:
>and (mc.LocationID=2)
>and (mi.LocationID=2)
>
>to:
>WHERE (mc.LocationID=2) and (mi.LocationID=2)
>
>
>Daniel Rail
>Senior System Engineer
>ACCRA Group Inc. (www.accra.ca)
>ACCRA Med Software Inc. (www.accramed.ca)
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
>keyword-searchable FAQ, community code contributions and more !
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
>keyword-searchable FAQ, community code contributions and more !
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/