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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to do this. 1

Status
Not open for further replies.

pbcharlie

Technical User
Jan 16, 2002
55
I have two tables. Users and names.
In users the fields are ID, Fname, Lname, Location, sex
in the names table I have Fname, lname and sex.

What I want to be able to do is have an insert query that inserts from the names table, however the names are randomly selected and also randomise the Fname, Lname combination to a predetermined number of records.

Is it possible and how?

Thanks in advance
Charlie
 
Hi Charlie,
The tables you are working with are not truly normalised and the use of Fname & LName in a second table would just compound the potential problem.
If I have misunderstood what you are after please let me know!
 
Actually, you have all the info you need in the users table. Why moving it to another table???
If you want to make some assignments table, all you need is the UserID from users table. Nothing else
Randomization can be made by :

Order By Rnd(UserID)

and a predefined number of records is set by the Top keyword:
Select Top 10 blah blah blah



[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top