I'm a bit new to MySQL (know MS SQL well...and that may be the
problem...getti ng the syntax confused) and I'm having a join problem...can
anyone offer some help? Here's my problem:
I have table1 that needs to "left" join to table1A, table1B, and table1C
which is corrently done with the following:
select table1.x, table1a.y, table1b.z, table1c.q
from table1
left join table1a on table1.ID = table1a.ID
left join table1b on table1.ID = table1b.ID
left join table1c on table1.ID = table1c.ID
order by table1.x
The problem arises when I need an "inner" join from table1b to table2.
Here's what I'm trying to do, but it's not working.
select table1.x, table1a.y, table1b.z, table1c.q
from table1
left join table1a on table1.ID = table1a.ID
left join table1b
inner join table2 on table1b.XX = table2.XX
on table1.ID = table1b.ID
left join table1c on table1.ID = table1c.ID
order by table1.x
Any help would greatly be appreciated.
TIA
-Bruce Duncan
problem...getti ng the syntax confused) and I'm having a join problem...can
anyone offer some help? Here's my problem:
I have table1 that needs to "left" join to table1A, table1B, and table1C
which is corrently done with the following:
select table1.x, table1a.y, table1b.z, table1c.q
from table1
left join table1a on table1.ID = table1a.ID
left join table1b on table1.ID = table1b.ID
left join table1c on table1.ID = table1c.ID
order by table1.x
The problem arises when I need an "inner" join from table1b to table2.
Here's what I'm trying to do, but it's not working.
select table1.x, table1a.y, table1b.z, table1c.q
from table1
left join table1a on table1.ID = table1a.ID
left join table1b
inner join table2 on table1b.XX = table2.XX
on table1.ID = table1b.ID
left join table1c on table1.ID = table1c.ID
order by table1.x
Any help would greatly be appreciated.
TIA
-Bruce Duncan
Comment