Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: can I select a single random row
You can use DBMS_RANDOM to assign a variable a random number value. You can then use the variable in an SQL statement.
The error you describe indicates that you are trying to use DBMS_RANDOM in a SQL statement.
Also, are you seeding and initializing the DBMS_RANDOM package before using it?
Chris Weiss
Chief Scientist
PureCarbon
"Baba Yetunde" <nospam_at_nospam.com> wrote in message
news:HjlH6.15966$Mz.2205031_at_news1.cableinet.net...
> Hi,
>
> I have a table that has a field for Question and a field for Answer. How
can
> I run a procedure to select one row of questions and answers. I have 100
> Q&A's. I am using Oracle 8.0.6 on AIX, I have tried using the
> dbms_random.random package, but gives an error message " Function can not
> guarantee Not to update database"
>
>
> Any help req.
>
> Fogun
>
>
Received on Tue May 01 2001 - 00:09:32 CDT
![]() |
![]() |