G
Guest
hi all
the result of 'WHERE field IN (x, y, z)' dosn't take care of the order of x,
y, z.
is there a way to do exactly this: return records in a given order (not ASC
or DESC but x, y, z? i was surprised to see, that something like
SELECT * FROM table WHERE field IN (4, 23, 7, 79) ORDER BY field IN (4, 23,
7, 79)
does not cause an error, but it also doesn't return the records in the
desired order.
i know how to work around the problem, but is there a direct way?
pp
the result of 'WHERE field IN (x, y, z)' dosn't take care of the order of x,
y, z.
is there a way to do exactly this: return records in a given order (not ASC
or DESC but x, y, z? i was surprised to see, that something like
SELECT * FROM table WHERE field IN (4, 23, 7, 79) ORDER BY field IN (4, 23,
7, 79)
does not cause an error, but it also doesn't return the records in the
desired order.
i know how to work around the problem, but is there a direct way?
pp