Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
nschultz
Starting Member
3 Posts |
Posted - 2005-10-21 : 15:24:20
|
I am storing data for a "random transaction survey" in Access based on the sevices completed by tellers.I want no more than 3 randomly selected surveys to be sent out per teller id. I have a table that has columns that look like this:TELLERID|CUSTNAME|CUSTTRANSTYPE616|JIM|WITHDRAWAL616|LISA|DEPOSIT616|BILL|PAYMENT616|SARA|WITHDRAWAL34|NATE|DEPOSIT34|ZACK|DEPOSIT34|AMY|DEPOSIT34|VINCE|DEPOSIT34|LAURA|DEPOSIT57|ERIC|DEPOSIT57|BONNIE|DEPOSIT8|TED|DEPOSIT7|JEROME|DEPOSIT7|SALLY|DEPOSITThe result needs to be random 3 records per teller. Sample result:616|JIM|WITHDRAWAL616|LISA|DEPOSIT616|SARA|WITHDRAWAL34|NATE|DEPOSIT34|VINCE|DEPOSIT34|LAURA|DEPOSIT57|ERIC|DEPOSIT57|BONNIE|DEPOSIT8|TED|DEPOSIT7|JEROME|DEPOSIT7|SALLY|DEPOSITThis is what I've tried:Select top 3 TELLERID, CUSTNAME, CUSTTRANSTYPEfrom Tablewhere TellerID = 616order by rnd(TELLERID)This statement only gets 3 random records for "616". I want 3 for all unique Teller ID'sAny help? Nate |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
nschultz
Starting Member
3 Posts |
Posted - 2005-10-25 : 19:36:32
|
Since I'm just a beginner. Can you explain pt. two e.g. how it works?Nate |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-26 : 01:43:40
|
Did that work?In that blog ask your question by posting it as comment MadhivananFailing to plan is Planning to fail |
 |
|
nschultz
Starting Member
3 Posts |
Posted - 2005-10-26 : 16:06:50
|
No it doesn't work. It's not something that will work in Access. I need to know how to do this in Access because that is my only availabe resource.Nate |
 |
|
|
|
|