It looks like that your first join clause are inconsistent in itself, that
is, you declared it for tables A & B, but actually used A & C instead:

ts_software RIGHT JOIN t_computers ON
t_softwareassoc.SoftwareAssocSoftwareID = ts_software.SoftwareID

-----Original Message-----
From: Weydson Lima [mailto:weys...@gmail.com] 
Sent: Wednesday, April 21, 2010 10:51 AM
To: mysql@lists.mysql.com
Subject: Join issues

I am dealing with a JOIN error issue. The following query:

SELECT *
FROM (((ts_software RIGHT JOIN t_computers ON
t_softwareassoc.SoftwareAssocSoftwareID = ts_software.SoftwareID) LEFT JOIN
ts_softwaremfg ON
ts_software.SoftwareMfgID = ts_softwaremfg.SoftwareMfgID) LEFT JOIN
ts_eqtype ON
t_computers.CompEqTypeID = ts_eqtype.EqTypeID) RIGHT JOIN t_softwareassoc ON
t_computers.CompID = t_softwareassoc.SoftwareAssocCompID

is giving the error:

C_ReportUnknown column 't_softwareassoc.SoftwareAssocSoftwareID' in 'on
clause'

I assume that the reason for that error is because the first join is being
called before the RIGHT JOIN t_softwareassoc. What would be the best way to
solve that? I tried to move the RIGHT JOIN t_softwareassoc to the top but it
didn't help.

Thank you,
 Wey



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to