stanl
04-03-2012, 09:07 AM
Just need to set up a field with a series of random future dates based on an exisiting date - assume this is for an inventory (it isn't but the example is adequate)
Date_Entered Date_Sold
and you want to practice reports like 'what is the average days item_X is on the shelves.
So you generate 1,000 date_entered with a single date, and want to replace Date_Sold with a increment of between 1 and 45 days (Access Table)
I tried
Update mytable SET Date_Sold = Date_Entered + Int((45-1+1) * Rnd +1)
The issue seems to be that the same random number is used to update all rows.
Has anyone else experience this and know of a workaround?
Date_Entered Date_Sold
and you want to practice reports like 'what is the average days item_X is on the shelves.
So you generate 1,000 date_entered with a single date, and want to replace Date_Sold with a increment of between 1 and 45 days (Access Table)
I tried
Update mytable SET Date_Sold = Date_Entered + Int((45-1+1) * Rnd +1)
The issue seems to be that the same random number is used to update all rows.
Has anyone else experience this and know of a workaround?