Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL query
This will work as well and might be a bit quicker :
SELECT FIELD,
DECODE(INSTR(FIELD,'HISTORY'),0,0,2) + DECODE(INSTR(FIELD,'ASIA'),0,0,1)
SORT_ORDER
FROM TABLE
WHERE DECODE(INSTR(FIELD,'HISTORY'),0,0,2) +
DECODE(INSTR(FIELD,'ASIA'),0,0,1) > 0
ORDER BY SORT_ORDER DESC
/
HTH Conan Received on Mon Nov 08 1999 - 07:18:19 CST
![]() |
![]() |