[Resolved] Custom Order By?
Wondering if it is possible to order by particular values??
That is I have a column (varchar) named "Status" with values such as; Entered, Active, Completed etc (I didnt design the DB).
What I need is to order by Entered, then by Active then Completed etc.. Is this possible??
Ive got this code for SQL; but it doesnt work in Access (03)..
Wondering if it is possible to order by particular values??
That is I have a column (varchar) named "Status" with values such as; Entered, Active, Completed etc (I didnt design the DB).
What I need is to order by Entered, then by Active then Completed etc.. Is this possible??
Ive got this code for SQL; but it doesnt work in Access (03)..
Code:
ORDER BY
CASE Status
WHEN 'Entered' THEN 0
WHEN 'Active' THEN 1
WHEN 'Completed' THEN 2
ELSE 3 END, Status
Last edited: