Subject How to arrange Year wise and then Month Wise
Author Muthu Annamalai
I need help with arranging months in my stored procedure. See my SP

FOR SELECT FIRST 12 EXTRACT(MONTH FROM RECEIPTDATE),COUNT(*),SUM
(AMOUNT)
FROM RECEIPT
GROUP BY 1
INTO :PERIOD,:RECEIPTS,:SALES
DO SUSPEND;

The stored procedure results are like this

PERIOD
1
2
8
9
10
11
12

I need to sort year wise first and then month as follows

PERIOD

10
11
12
1
2
8
9

Any help is highly appreciated

Thanks,

Muthu