
Quick Database question - Easy one for you experienced programmers, but out my hands - Please help
Quote:
>I want to create a VB program that will track 12 salespersons stats. The
>stats will be the same ones for each, but will be inputted each week. (4 of
>the same ones) My question is DO I MAKE 12 SEPARATE DATABASES? The
>information needs to separate for each salesperson to be tracked. I plan on
>using a combo box to pull down for access to a salesperson where I can
>enter that weeks figures, and then also pull up their previous 4, 8 , or 12
>week stats..
>Thanks.
>--
>Dave
>Remove the "spam" from the address, or use:
Depending upon your data requirements, you can probably get away with one or two tables. As an
example, I am assuming the following:
Data to be stored:
Salesrep ID
Salesrep Name
Date
Salesrepstat
The Salesrepstat may be an over-simplification of what you want to store, but let's go with it for
the moment. The Date is the date of entry, or perhaps the date of the first day of the given week,
etc.
One table for this, though proper (technically) database design would call for two tables. (If the
stats require more than one field, use two tables, joined by SalesRepID).
When you go to report on the information, you must specify SalesRepID and the Date to pull from (you
can use the DateDiff/DateAdd functions to set up for ranges).
Using SQL would make this simplest, but if you are reporting through a third-party application (such
as Crystal Reports), you can set up the filters through the methods defined for that product.
But, you do NOT want a separate table for each rep -- what happens when you gain a rep, or lose one?
You end up fixing the program for each change of personnell.
Good luck!