Georgev is correct - you should really look at improving your database design. In the time being you can use the following code which I believe should work but I don't have a MySQL server at hand to test it:
Code:
select *
from (
select id, desc, tech1_id as tech_id, tech1_hours as tech_hours
from MyTable
union
select id, desc, tech2_id, tech2_hours
from MyTable
) as MyNewView;
You should get a select showing
id, desc, tech_id, tech_hours so now you can use a normal group by to get total hours per job:
Code:
select id, desc, sum(tech_hours)
from (
select id, desc, tech1_id as tech_id, tech1_hours as tech_hours
from MyTable
union
select id, desc, tech2_id, tech2_hours
from MyTable
) as MyNewView
group by id, desc;
Mike