Re: Random sort via SQL in ASP
- From: engles@xxxxxxxxxxxx
- Date: 12 Apr 2007 21:13:58 -0700
On Apr 12, 7:33 pm, "muskie" <goo...@xxxxxxxxxxxxxxxx> wrote:
I've looked through as many posts about this as possible, but all end
with no resolution. I simply need records from a table in random
order, and I will be calling this recordset in a SQL statement from
ASP. I've tried the following but it does not produce random order:
SELECT * FROM Table1 ORDER BY Rnd(TableID) ASC;
where TableID is an autonumber field.
I've seen references to Randomize, but how do you use Access's
randomize from ASP?
Does anyone know of a simple solution for this?
Thanks,
Matt
I'd be surprised if you can use this in SQL using the method you are
trying. I'd write some code that you can trigger that puts a random
number in a field (e.g. sortfield as long) in the table. Then you can
select and order by that random field (e.g. ORDER BY sortfield). This
will certainly get the job done. Whenever you want a different
randomizing, then trigger the code.
-- Larry Engles
.
- Follow-Ups:
- Re: Random sort via SQL in ASP
- From: engles
- Re: Random sort via SQL in ASP
- References:
- Random sort via SQL in ASP
- From: muskie
- Random sort via SQL in ASP
- Prev by Date: Re: Corruption - how to MAKE it happen?
- Next by Date: Re: "FE Updater" and macro security
- Previous by thread: Random sort via SQL in ASP
- Next by thread: Re: Random sort via SQL in ASP
- Index(es):
Relevant Pages
|
|