Re: Random Record Selection
- From: "Van T. Dinh" <VanThien.Dinh@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Nov 2006 16:16:54 +1100
IIRC, you can replace it with any Field in your Table. If you look at it,
the expression inside rnd() always evaluated to 1!.
The reason to use a Field name is to trick JET to go to VBA to re-evaluated
the rnd() function for each row (otherwise, JET will optimize and will call
the function rnd() only once and use the same value for each row).
--
HTH
Van T. Dinh
MVP (Access)
"Molasses26" <Molasses26@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:66D83ED3-34BE-4289-99DD-7D4E4DEABB9F@xxxxxxxxxxxxxxxx
Hi!
I seem to be having a brain doner Monday and I can't figure out how to
make
the query from Joe Foster work!
I entered the first part of the code into a module but then I'm not sure
what to do with the last part. I tried entering it as an SQL query using
my
table name dbo_bs_excp but I don't know what the ".question" in the Order
By
is supposed to be.
Please help!!
select top 10 dbo_bs_excp.* from dbo_bs_excp
where dbo_bs_excp.resolved_dt > #11/1/2006# AND randomizer() = 0
order by rnd(isnull(dbo_bs_excp.question) * 0 + 1)
.
- Prev by Date: Re: problem with WHERE clause when using Microsoft.Jet.OLEDB.4.0
- Next by Date: Re: Querie problem
- Previous by thread: Re: problem with WHERE clause when using Microsoft.Jet.OLEDB.4.0
- Next by thread: Re: Querie problem
- Index(es):