Here\'s what I need to be able to do.
I have a List in java which I can convert to comma separate string of IDs like so \"3,4,5,6,1,2\"
I wonder if there\'s way
If you can modify the query in java, you could do something like this:
SELECT t.id
FROM t_test t
ORDER BY DECODE(t.id, 3, 'A', 'B') ASC,
DECODE(t.id, 4, 'A', 'B') ASC,
DECODE(t.id, 5, 'A', 'B') ASC,
DECODE(t.id, 6, 'A', 'B') ASC,
DECODE(t.id, 1, 'A', 'B') ASC,
DECODE(t.id, 2, 'A', 'B') ASC;
You have to put a decode in the order by clause for each element in the list. The second parameter in each decode is one element of the list.