How to order by total sum cross-tab?
See below
SaleMounth
State 1 2 3 4 5 Total Sum
AL 10 12 10 32
CA 2 10 5 7 24
HI 10 5 8 23
--------------------------------------------------
12 15 10 17 25 79
PS. My select does not
SELECT DISTINCT
ASP_MOVMENSAL.AMOUNTPAID,
ASP_MOVMENSAL.STATE,
ASP_MOVMENSAL.MONTH,
ASP_MOVMENSAL.TOTAL_AMOUNTPAID
FROM ASP_MOVMENSAL(:parMesInicial, :parMesFinal, :parAno, :parCaixa,
:parConta, :parRegiao)
ORDER BY ASP_MOVMENSAL.TOTAL_AMOUNTPAID DESC
--
Joseh-Henrique
Goiania, GO
SaleMounth
State 1 2 3 4 5 Total Sum
AL 10 12 10 32
CA 2 10 5 7 24
HI 10 5 8 23
--------------------------------------------------
12 15 10 17 25 79
PS. My select does not
SELECT DISTINCT
ASP_MOVMENSAL.AMOUNTPAID,
ASP_MOVMENSAL.STATE,
ASP_MOVMENSAL.MONTH,
ASP_MOVMENSAL.TOTAL_AMOUNTPAID
FROM ASP_MOVMENSAL(:parMesInicial, :parMesFinal, :parAno, :parCaixa,
:parConta, :parRegiao)
ORDER BY ASP_MOVMENSAL.TOTAL_AMOUNTPAID DESC
--
Joseh-Henrique
Goiania, GO
This discussion has been closed.
Comments
to group on the appropriate fields) and sort the data by that field.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com