Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Field With Random Text

Status
Not open for further replies.

Leadcast

Technical User
Apr 12, 2007
1
US
Hi,

I have 2 tables. Table 1 has text values in the field with 25 records total. The Table 2 has several thousand records. I need to update a field in table 2 with random text values of Table 1 .

Trying to do this with the rnd(), but having a key violation I think due to the text/number conflict. Is there another way to do this?

Thanks

LeadCast
 
This:

[tt]Int((25 * Rnd) + 1[/tt]

Will return a random number between 1 and 25, which can be used to get a record from the small table, however, this seems quite an odd thing to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top