0

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).

2 Answers 2

1

You have to specify ORDER BY strProjectName DESC, strJobName DESC or else ASC will be assumed for strProjectName.

Sign up to request clarification or add additional context in comments.

Comments

1

You can mix ordering by different columns like so:

ORDER BY a DESC, b ASC

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.