Order by question

rynorem

Registered User.
Local time
Today, 15:28
Joined
Jan 9, 2006
Messages
27
I have to run a seniority query but have an issue. I have job descriptions but can't put them in ASC order because they wouldn't be by seniority.
For example:

Docker
Docker supervisor
Dock Chief
Shift Supervisor
Section Leader

In SQL I would do a decode function and assign each a number and then put them in order by thier number assigned.

What are my options in Query to perform this function. Thanks.
 
Use an index for seniority, storing the alpha seniority level in a table linked to your main table. Having actual seniority in you main table violates a normalization rule. Then you sort on the Index, ASC or DESC, depending on the result wanted.

You almost had it. You said it in words.
 
That did it. Thanks. I'm learning.
 

Users who are viewing this thread

Back
Top Bottom