Randomization Field in a Query Question

  • Thread starter Thread starter case600lp
  • Start date Start date
C

case600lp

Hi -

I'm trying to create a query that generates some random fields.

Such as:

Select recordid, name, rnd(0) as field1, rnd(0) as field2, [field1] +
[field2] as sumof;

BUT while field1 and field2 are properly randomized the problem is,
the addition calculation also seems to "re-randomize"! How can I
store the random values for "stable" calculations???

If I even resize the window of the resulting query, it regenerates new
random values apparently pixel by pixel of mouse movement!

Thanks for any advice,
Howard
 
The only way for them to be static is to store them using a make table or
append query.
 
The only way for them to be static is to store them using a make table or
append query.
--
KARL DEWEY
Build a little - Test a little



I'm trying to create a query that generates some random fields.
Select recordid, name, rnd(0) as field1, rnd(0) as field2, [field1] +
[field2] as sumof;
BUT while field1 and field2 are properly randomized the problem is,
the addition calculation also seems to "re-randomize"!    How can I
store the random values for "stable" calculations???
If I even resize the window of the resulting query, it regenerates new
random values apparently pixel by pixel of mouse movement!
Thanks for any advice,
Howard- Hide quoted text -

- Show quoted text -

Hi Karl -

Thanks for the tip! I can insert them into a table and requery
them.

Why does it work like that? What causes RND to not put stable values
into a query results?

I'm just asking because I don't see why they would have created it to
remain stable just like other function results when used in fields in
queries...

Howard
 
I can not answer why but the random function in Excel works the same way.
--
KARL DEWEY
Build a little - Test a little


The only way for them to be static is to store them using a make table or
append query.
--
KARL DEWEY
Build a little - Test a little



I'm trying to create a query that generates some random fields.
Select recordid, name, rnd(0) as field1, rnd(0) as field2, [field1] +
[field2] as sumof;
BUT while field1 and field2 are properly randomized the problem is,
the addition calculation also seems to "re-randomize"! How can I
store the random values for "stable" calculations???
If I even resize the window of the resulting query, it regenerates new
random values apparently pixel by pixel of mouse movement!
Thanks for any advice,
Howard- Hide quoted text -

- Show quoted text -

Hi Karl -

Thanks for the tip! I can insert them into a table and requery
them.

Why does it work like that? What causes RND to not put stable values
into a query results?

I'm just asking because I don't see why they would have created it to
remain stable just like other function results when used in fields in
queries...

Howard
 
Back
Top