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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Selecting Random record

Re: Selecting Random record

From: Uwe Schneider <us_at_webde-ag.de>
Date: Fri, 22 Sep 2000 16:59:22 +0200
Message-ID: <39CB73CA.AA55D4D7@webde-ag.de>

Joseph Ranseth wrote:
>
> I am trying to create a random electronic draw.
> I need to select random records from a view(which pulls from 2 tables). I'd
> also like to give a user x number of bonus entries if a certain value is
> set.
>
> Any ideas or advice?
>

Since randomness is not an element of relational algebra, there is no direct way to retrieve random numbers through SQL.

On the other hand you could install the dbms_random package. The code is in $ORACLE_HOME/rdbms/admin/dbmsrand.sql.

Uwe

-- 
Uwe Schneider - WEB.DE AG - Amalienbadstr. 41 - 76227 Karlsruhe 
Forschung & Entwicklung - Tel. (+49) 721 94329 832
"In a world without walls and fences, who needs windows and gates?"
Received on Fri Sep 22 2000 - 09:59:22 CDT

Original text of this message

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