tbl1
C1 | C2 |
6 | 3 |
2 | 9 |
tbl2
C1 | C2 | C3 |
6 | 3 | 21 |
2 | 9 | 21 |
I want to dynamically derive table 2 from table 1.
tbl2.C3 contains values calculated from tbl1.c1 and tbl1.c2.
I cannot hard code c3, because the calculation used to get C3 is based on a user's choice.
What I need help with is a way to do a LEFT JOIN to tbl1 to get tbl2, and finally be able to issue a mysql query on tbl2 similar to this:
select * from tbl2 where c3 <= 'someval'
Thanks for the help.
Richard.