Left join on multiple merge tables returns NULL
Hi,
I've been wondering, I ran this particular SQL statement on multiple merge tables.
I'll call it, (Table 1) ab_all, (Table 2) ac_all, (Table 3) ad_all, all in which are merge tables.
ab_all is infact a merge table for the tables ab_{date1}, ab_{date2}, etc.
same goes for the other tables, ac_all, ad_all
Merge tables
============
1. ab_all
2. ac_all
3. ad_all
Non-Merge/MyISAM tables
=======================
1(a). ab_date1
(b). ab_date2
2(a). ac_date1
(b). ac_date2
3(a). ad_date1
(b). ad_date2
say if i were to run the following sql statment on the actual myisam tables/not the merge tables:
select ab_date1.date, ac_date1.from, ad_date1.to
from ab_date1
left join ac_date1 using(id)
left join ad_date1 using(id);
the above sql statement will return all the correct results. Now if I were to do execute the same sql statement, now with the merge tables instead:
select ab_all.date, ac_all.from, ad_all.to
from ab_date1
left join ac_all using(id)
left join ad_all using(id);
the first colum ab_all.date will return the correct results, but the two later columns, ac_all.from and ad_all, result will return as null;
Thanks in advance