1 Reply Latest reply on Jan 16, 2008 10:42 AM by Dan Bracuk

    Union Query

    Team_Source
      I am having troubles trying to figure out how to write a union query. Here is the portion of the query that is troubling me:
      SELECT 0 AS Total_Weekly_Hours_Recorded, 0 AS Total_Time_Spent, SUM(Value) AS Total_Value, 0 AS Total_Num_Checks_Trans
      FROM tblTransType

      What this is currently doing is summing up the values of all of the transaction type in the tblTransType table. What I need it to do is pull the Transaction type from the tblcontractinfo_submenuTable and then use the value of that transaction type from the tblTransType table and sum the values of the transtypes that have been entered in the tblcontractinfo_submenutable

      I have attached the entire coding as well. The coding is not complete as also I need to list everything by date, then the manager and finally by user. Right now I am just working on the calculation part.