Randomization Field in a Query Question

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
 
K

KARL DEWEY

The only way for them to be static is to store them using a make table or
append query.
 
C

case600lp

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
 
K

KARL DEWEY

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top