From: Martijn Tonies Date: August 30 2004 8:15pm Subject: Re: Shared column name List-Archive: http://lists.mysql.com/mysql/171785 Message-Id: <062c01c48ece$25116280$c802a8c0@martijnlaptop> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, > I know what the deal is supposed to be but can't seem > to fix it. > Two tables, VendorID exists in both tables (neither > are primary keys) > > I'm getting a "VendorID in where clause is ambiguous" > Sometimes it actually processes the SQL weird. > I think this is because same column name in both > tables, yet I have other same name in tables with no > effect. I tried alias on VendorJobs.VendorId AS Ven , > etc but it spit it back at me in the where clause with > an unknown. > > Here is the SQL: > > SELECT > `VendorJobs`.`JobID`, > `VendorJobs`.`Contact`, --8<-- snip > (`VendorJobs`.`TravelReq` = > `staTravelReq`.`TravelReqID`), > `VendorSignUp` > WHERE (vendorjobs.`VendorID` = 13) With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com