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 -> get # matches on OR statements

get # matches on OR statements

From: <nwsread_at_cloudband.com>
Date: 13 Sep 1999 00:46:45 +0100
Message-ID: <37dc3b65@glitch.nildram.co.uk>

        Givin the following sql query. Is there a way through trigger or procedural language to order the rows returned by number of true or's(1-3) in this case for returned rows.

        SELECT * from a_table where col1 = 'a' OR col2 = 'b' OR col3 = 'c';

        Basically i want to make these type of queries and order the results by how many columns match their search strings. e.g. all three cols matching being in front of rows where only one columnn matches it's search string.      Received on Sun Sep 12 1999 - 18:46:45 CDT

Original text of this message

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