Assign Records to analysts

Assign Records to analysts

 

  

Here is my issue. I have a list of merchants
(generated daily) and I need to assign them eually
to
a set of analysts. Both the merchant list and
analyst
list can change daily.
I want to assign each merchant with an analyst daily
and need help to write out a stored procedure for
this
(do not want to use VB).

Here is relevant code for the tables:

CREATE TABLE MerchList (
MerchListID int IDENTITY (1, 1) NOT NULL ,
FileDate datetime NOT NULL ,
MerchID int NOT NULL ,
AnalystID int NOT NULL ,
)

CREATE TABLE tblAnalyst (
AnalystID int IDENTITY (1, 1) NOT NULL ,
AnalystName varchar(100) NOT NULL
)

there will be about 10000 records in table MerchList
and around 25 records in table tblAnalyst.

This will be used to assign work to analysts on a
daily basis.

Thanks for all your help!

Vishal




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

MS Sql Server LazyDBA home page