SELECT Namefield, hours1 AS hours FROM TableA ; UNION ALL ; SELECT Namefield, hours2 AS hours FROM TableB ; UNION ALL ; SELECT Namefield, hours3 AS hours FROM TableC ; INTO CURSOR temp1 SELECT Namefield, SUM(hours) FROM temp1 ; GROUP BY 1 ; INTO CURSOR crsResult>I have three separate tables that have the names of individuals (the same name might appear in one, two or all of the tables). Each of the tables contain varying numeric data but I would like to create a query that calculates the sum of the records from each table according to the individuals name.
>Table A Table B Table C >Henry Henry Henry >14 Hours 9 Hours 12 Hours>My query should create a Table D which shows Henry as having a total of 35 Hours. The field for the number of hours has a different name in each table but the field for the person's name is the same.