Group & Sort Single Field in Query (1 Viewer)

Weekleyba

Registered User.
Local time
Yesterday, 21:21
Joined
Oct 10, 2013
Messages
586
I have a query with all the data I want in it.
I want it grouped by ProjectType, then FundingType, then sorted by ProjectPriority, which is how it is set up currently.
The problem I have is, the ProjectPriority can be a number "01, 02, 03, etc" prioritizing the projects or it can be "OBL" when the funding is Obligated (Awarded).
I would like to group all the "OBL" at the top or bottom of query.
The ProjectPriority field in the table is a short text field.

Can anyone help me out with this?
See two snap shots attached showing the query.
Thank you.
 

Attachments

  • Query1.jpg
    Query1.jpg
    94.6 KB · Views: 248
  • Query2.jpg
    Query2.jpg
    101 KB · Views: 247

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 19:21
Joined
Oct 29, 2018
Messages
21,453
Hi. You could try something like:
Code:
...ORDER BY ProjectPriority="OBL", ProjectPriority
Hope it helps...
 

Weekleyba

Registered User.
Local time
Yesterday, 21:21
Joined
Oct 10, 2013
Messages
586
Yes. Thanks!
Here's what I ended up with in the SQL

Code:
ORDER BY [1ProjectT].ProjectPriority="OBL" DESC

Thanks for the help.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 19:21
Joined
Oct 29, 2018
Messages
21,453
Yes. Thanks!
Here's what I ended up with in the SQL

Code:
ORDER BY [1ProjectT].ProjectPriority="OBL" DESC
Thanks for the help.
Hi. You're welcome. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom