cancel
Showing results for 
Search instead for 
Did you mean: 

How to group and sort a DB-ResultSet

Former Member
0 Kudos

Hello Developers,

I have a problem with the sorting of my query resultset.

I have a resultset like this:

f_date | ebit | quantity

-


2006-06-07 | 200.00 | 120

2006-06-08 | 220.00 | 114

2006-07-17 | 160.00 | 160

2006-07-27 | 210.00 | 190

2007-02-12 | 100.00 | 20

2007-04-13 | 500.00 | 220

2007-06-14 | 200.00 | 120

.... and so on

so I want to group by month ( Month ({rs.f_date}) ) so I get:

ebit quantity

month 2

2007 100.00 20

month 4

2007 500.00 220

month 6

2006 420.00 234

2007 200.00 120

month 7

2006 370.00 350

so I want to sort this table with the actuel month (today: 2007-06-14) to get this:

ebit quantity

month 6

2006 420.00 234

2007 200.00 120

month 7

2006 370.00 350

month 2

2007 100.00 20

month 4

2007 500.00 220

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Please re-post if this is still an issue