good afternoon, I am having some trouble creating a pivot table.
set dateformat ymd
select * from
select distinct account_title, (tran_amount + vat_amount) as total,project_code from nominalsview
where managerid = 1052 and tran_date between '2013-04-01' and '2014-03-31'
for project_code in (CORP1, EMP01, FAC01, FAM01, FIN01, FIR01, MAR01, MAT01, MUN01,
PLA01, PRIV1, PRO01, PRO02, REC01, REP01, RES01, ADMIN, CON01, COR01, HR001, IT001,
LIT01, MIS01, PI001, PRF01, PRL01, PROP1, SSD01, TAX01, TRA01, TRU01)
the table appears to be fine but the summed totals are not correct, its as if some rows aren't being added to the equation. am I missing something really obvious here?