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

Home -> Community -> Usenet -> c.d.o.server -> Random first record returned

Random first record returned

From: Melisa Mrazik <mmrazik_at_ix.netcom.com>
Date: 1997/03/27
Message-ID: <333AD71C.38CE@ix.netcom.com>#1/1

I've been posed a unique SQL problem and hope that someone has a "quick" way of solving this required feature to an application (situation has been changed to protect the client's business but the concept is the same):

From a set number of records in a table, HOTEL, a query will be sent with particular requirements (i.e. modern/historical, view/no-view, etc) and must return a matching set of records with the first record returned going to the application as the "preferred" hotel. If this same query with the same requirements is sent to the same table, a different first record must be returned to ensure randomness.

I was thinking that a dynamic ORDER BY clause selecting one of 7 columns in the table to be ordered ascending or descending would give me at least 14 combinations of randomness, but I don't know if this is the best way of doing this required functionality.

Any and all suggestions appreciated!
Thanks! Received on Thu Mar 27 1997 - 00:00:00 CST

Original text of this message

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