Custom order by
Posted on 2006-04-04
This might be easy for you, but not for me. I have a query like:
SELECT s.section_name, F.PROMPT
FROM knta_sections s, KNTA_PARAMETER_SET_FIELDS F
WHERE F.Parameter_Set_Context_id IN (31274)
AND f.section_id = s.section_id
AND F.PROMPT IN ('Project Lead:', 'Budget:', 'Detailed CBA:', 'TG2 Revised CBA:')
This returns me the desired output. However, the sorting order isn't great. I would like the output in the same order as the input list supplied to PROMPT. i.e.
'Project Lead:', 'Budget:', 'Detailed CBA:', 'TG2 Revised CBA:'
Can you help? Thanks in advance.