Hi Joseph,
When you use so-called aggregate functions, like SUM, you need to group all fields that are not in such a function.
So please add the GROUP BY statement at the end of your query like this:
GROUP BYT2.callID, T2.manufSN, T2.internalSN, T2.itemName, T1.DocPstDate
As you can see, we group all fields except for T0.DocTotal, because it is in the SUM function
Also, you cannot have the T0.DocNum field in the result set, so please remove that from the SELECT statement
When you want to add a totals row using the UNION statement, you need to put the same number of "fields" into the SELECT statement. My previous example would work because there were 2 fields in the top query, and 2 fields in the bottom (totals) query.
Regards,
Johan