Reputation: 3904
I want to sort on strProjectName
and strJobName
, but I want to prioritize strProjectName
. Using the regular order by method: ORDER BY strProjectName, strJobName ASC
does work, but not when sorting DESC
, due to the fact it will sort on strJobName
instead.
TL;DR: I want to sort first on strProjectName
and then on strJobName
. (And yes, there are more fields).
Upvotes: 0
Views: 414
Reputation: 34308
You can mix ordering by different columns like so:
ORDER BY a DESC, b ASC
Upvotes: 1
Reputation: 24078
You have to specify ORDER BY strProjectName DESC, strJobName DESC
or else ASC
will be assumed for strProjectName
.
Upvotes: 1