Hello there, I have a sorting problem at the moment for multiple sorting.
With a normal database i know how to multiple sort
e,g SELECT A,B,C
FROM Table1
Order by A,B DESC

My problem is that I want to insert data into a table from 2 joined tables. I can sort it once but i need it sort again a second time.


my code is below
strSQL = "INSERT INTO HIGHSCORE(PlayerId, CountScore) SELECT SCORE.PlayerId, Count(Player.Score_Date) AS CountOfScore_Date" & _
" FROM SCORE INNER JOIN DETAILS ON SCORE.PlayerId = DETAILS.PlayerId" & _
" WHERE (((SCORE.Score_Date) Between #" & varDateF & "# And #" & vardateT & "#)) ) " & _
" GROUP BY SCORE.PlayerId" & _
" ORDER BY Count(SCORE.Score_Date) DESC"
I then produce a crystal report with output
Surname Forename Score
Shearer Alan 19
Allen John 19
Caldwell Gary 19
Byrne Ian 19
Smith John 18
Childs Fred 18

It shows the players with the highest score first, what i would like to know is there any way I can maybe sort the players by surname secondly afyer firstly sorting them by score to show output like:

Allen John 19
Byrne ian 19
Caldwell gary 19
Shearer Alan 19
Chils Fred 18
Smith John 18