Ow Mun Heng wrote:
I have 2 table.
Zones(Z1......Z20) and Radius(R0..R4)
where
R0 is equivalent to Z1
R1 " Z5
R2 " Z9
R3 " Z13
R4 " Z17
How can I make the query to join them in such ways?
eg:
select
A,B,C,D
from
Zone
inner join radius
on R1 = Z5
on R2 = Z9
on R3 = Z13
on R4 = Z17
or do I have to use a subquery??
How about:
select A,B,C,D from Zone
left join radius
on R1 = Z5
and R2 = Z9
and R3 = Z13
and R4 = Z17
select A,B,C,D from Zone
left join radius
on R1 = Z5
or R2 = Z9
or R3 = Z13
or R4 = Z17
It's not clear what the relationship is between the tables so I don't
know which of the two is what you want.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]