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

Create a Random list

Status
Not open for further replies.

jeffwest1

MIS
Aug 29, 2007
50
0
0
NL
In a table i have a list of names and address's, each of these has a unique client ID, and each of these clients is allocated a caseload advisor.

In order to do a caseload audit, i have been asked to create a report with 6 random client no for each of the advisors.

I can't seem to get the random ness, i always end up with the first 10, does anyone have an idea how to do this in Sybase?

--------------------------------
Luke: But tell me why I can't...
Yoda: No, no, there is no why. Nothing more will I teach you today. Clear your mind of questions.
 
Something like this?
select top 6 id from sysobjects order by newid()
 
The only problem with that is that it always just gives me the same 6.

I have solved this now anyway using Crystal reports out of the database.

--------------------------------
Luke: But tell me why I can't...
Yoda: No, no, there is no why. Nothing more will I teach you today. Clear your mind of questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top