Order By question



vb6, ado, .mdb format, no access, win2k
sql newb <g>
assuming sql such as "Select F1, F2 From TableName Order by...."

with this order by statement
"order by F1, F2 DESC "

the records are returned thus
F1 : F2

1N : 36
1N : 24
1N : 12

2L : 36
2L : 24
2L : 12

3R : 36
3R : 24
3R : 12

4B : 36
4B : 24
4B : 12


How can i change 'order by' statement (or create self-join) to return thus

1N : 36<<<< orig order ok
1N : 24
1N : 12

<<<<<<<<<<<< here need to group by F1 first, then Order by F2 somehow
2L : 36
3R : 36

2L : 24
3R : 24

2L : 12
3R : 12
<<<<<<<<<<<<

4B : 36<<<< orig order ok
4B : 24
4B : 12

Thanks for any pointers
Mark


.



Relevant Pages