Re: [GENERAL] Ordering by IN

2004-08-25 Thread Mike Benoit
It might not be pretty but: SELECT * FROM v_fol_unit_pub_utmpt WHERE folder_folder_object = 100120 AND unit IN ( 90072, 90005, 90074, 90075 ) AND unit_pub_type IN ( 2 ) AND utmpt IN ( 1 ) ORDER BY unit = 90072 desc, unit = 90005 desc, unit = 90074 desc; It probably won't work very well if you ne

Re: [GENERAL] Ordering by IN

2004-08-25 Thread Eric B . Ridge
On Aug 25, 2004, at 2:18 AM, Hadley Willan wrote: Hi,     I was wondering if it's possible to order the result set by some of the set contained in an IN clause. I had to do something like this recently. Ended up with a pl/pgsql function, looked a lot like this: create or replace function arr