>How would you select a sum of fields from 2 child tables for the parent key?
>
>Here is the pseudo code of what I need:
>
>select (sum(hrs*rate) from Labor where Labor.ifkey=Job.ipkey) + (sum (qty*price) from Material where Material.ifkey=Job.ipey) as TotalCost
How about something like
SELECT SUM( (labor.hrs * labor.rate) + (material.qty * material.price)) AS total cost;
FROM labor;
JOIN material ON labor.ifkey = material.ifkey;
WHERE labor.ifkey = job.ipkey