|
Dan1228
Starting Member
2 Posts |
Posted - 2010-08-16 : 14:30:34
|
| I have the following sql statement and im trying to divide the totals at the bottom but does not work, any recommendations? SELECT CNSLR# Agency, CNSNAME "Agency Name", OCT, NOV, DEC, JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, TOTPD "Total Pd", TOTALL "Total Allocated", DIFFRN Difference, PERCNT "% Spent" FROM COUNRPT20 UNION SELECT 0, 'Totals', SUM(OCT), SUM(NOV), SUM(DEC), SUM(JAN), SUM(FEB), SUM(MAR), SUM(APR), SUM(MAY), SUM(JUN), SUM(JUL), SUM(AUG), SUM(SEP), SUM(TOTPD), SUM(TOTALL), SUM(DIFFRN), SUM(TOTPD)/SUM(TOTALL) FROM COUNRPT20 |
|