Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
Date: Fri May 23 2008 - 14:04:57 CDT
Thanks for the quick reply, however i am getting a failure on line 2.
11.POPS AS `POPA`,
12.POPS AS `POPZ`
INNER JOIN pops.POPS as 11 WHERE circuits.popA = 11.popID
INNER JOIN pops.POPS as 12 WHERE circuits.popZ = 12.popID
Table-name = circuits
popA (secondary key referencing pops.popID)
popZ (secondary key referencing pops.popID)
table-name = pops
----- Original Message -----
From: "Rob Wultsch" <wultschgmail.com>
Cc: "MYSQL General List" <mysqllists.mysql.com>
Sent: Friday, May 23, 2008 8:35:39 AM GMT -08:00 US/Canada Pacific
Subject: Re: Query Output Issue
On Fri, May 23, 2008 at 11:27 AM, <mdimartinoopenaccessinc.net> wrote:
> I have a table that has two has two secondary keys referencing the same primary key of another.
> Table-name =Circuits
> Table-name = Location
> circuits.A_loc references locatioin.locationID
> circuits.Z_loc references locatioin.locationID
> How do i achieve the following output.
> circuitID Location A LocationZ
> 98129 BOSTON ATLANTA
> Do I actually have to create two location tables one for the A location and one for the Z location.
l1.location AS 'Location_A',
l2.location AS 'Location_Z'
INNER JOIN Location AS l1 WHERE circuits.A_loc =l1.locationID
INNER JOIN Location AS l2 WHERE circuits.Z_loc =l2.locationID
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql