Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: can I select a single random row
Thanks for that chris. I think my initial problem was I did not seed DBMS_RANDOM. Still with this I cannot acheive what I want.
Finally, I would then like to retrieve one row at random.
Is there any easy way of retrieving a single row at random?
F
"Chris Wiss" <chris_at_purecarbonnospam.com> wrote in message
news:9clg1q$1agh$1_at_msunews.cl.msu.edu...
> 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 - 12:20:41 CDT
![]() |
![]() |