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

Generating a report with a specified number of records 1

Status
Not open for further replies.

Mary99999

Programmer
Jan 18, 2001
3
0
0
US
I have a table with 840,000 records (medical claims). I want the user to enter a date parameter (date the claim was paid) and generate a random list of claims paid on that date. So far, no problem. But the user wants to also put in a parameter for how many claims they want to see on the report (50 or 100, or whatever.) The purpose is an audit of a certain number of claims. Thanks.
 
You are far better to do that at the database level. Choosing "random" records is a difficult chore, depending on how truly random you want them to be.

I would pass this off to your database developer, saying you want a stored procedure that takes as input parameters a date and a positive integer, and returns a selection of random rows for that date and in that quantity.
Malcolm
 
That sounds do-able. Our database guy is always ready to do whatever we need. Thanks very much for taking the time to answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top