StephenBye
Technical User
I am trying to produce a budget report for each department which details the nominal code and the respective totals for actual and budget using department as a header. The report I have produced is missing actuals where a budget does not exist for that nominal code in the other table (Audit_Split). The budget is also duplicated for lines where there have been more than one posting of an invoice per nominal code.
I am trying to write a “union all” query to avoid the missing actual figures but it does not like the statement below, any suggestions on how to rectify this?
AUDIT_SPLIT holds each transaction whereas FINANCIAL_BUDGET holds only summary information.
SELECT NOMINAL_CODE,DEPT_NUMBER,BUDGET,NET_AMOUNT
FROM AUDIT_SPLIT
UNION ALL
SELECT
NOMINAL_CODE,DEPT_NUMBER,BUDGET,NET_AMOUNT
FROM FINANCIAL_BUDGET
Is there anyway to eliminate duplicate lines from the budget figures, I have used “Supress duplicates” which does not display the duplicates but when I total the columns the duplicates are included.
Finally, we also need this data i.e. Nominal, Dept, Budget, Net Amount for a particular month and also cumulatively. So the report will have 2 sections side by side on with data for July only and the other with April to July figures on.
Any help would be greatly appreciated
I am trying to write a “union all” query to avoid the missing actual figures but it does not like the statement below, any suggestions on how to rectify this?
AUDIT_SPLIT holds each transaction whereas FINANCIAL_BUDGET holds only summary information.
SELECT NOMINAL_CODE,DEPT_NUMBER,BUDGET,NET_AMOUNT
FROM AUDIT_SPLIT
UNION ALL
SELECT
NOMINAL_CODE,DEPT_NUMBER,BUDGET,NET_AMOUNT
FROM FINANCIAL_BUDGET
Is there anyway to eliminate duplicate lines from the budget figures, I have used “Supress duplicates” which does not display the duplicates but when I total the columns the duplicates are included.
Finally, we also need this data i.e. Nominal, Dept, Budget, Net Amount for a particular month and also cumulatively. So the report will have 2 sections side by side on with data for July only and the other with April to July figures on.
Any help would be greatly appreciated