Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL query

Re: SQL query

From: Conan Farrell <conan_at_(remove_this)as-if.com>
Date: 8 Nov 1999 14:18:19 +0100
Message-ID: <01bf29ec$1e432200$b501ce0a@Cfarrell.snn.ie.sykes.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US