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 |
cvkk2010
Starting Member
5 Posts |
Posted - 2013-06-30 : 00:52:01
|
Team,Please help me with the QueryI have Two TablesTable 1 (Email_Assignment_Assignee) ==> Account_Number, Call_Type, Agent_Name, Assignee, ID(Identity, Primary Key)Table 2: (Email_Agents) ==> ID(Identity, Primary Key), Assignee_Name, LimitEmail_Agents table contains the Assignee Names to whom Account numbers to be assigned and the Limit will give numbers of Account numbers should be assigned.By Default the Assignee field will be NullI need the query to run the update which should update the names in the Assignee table based on the limitPlease Assist.Thanks in Advance. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-06-30 : 22:39:29
|
quote: I need the query to run the update which should update the names in the Assignee table based on the limit
How to update ? What is the logic here ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-01 : 01:36:28
|
quote: Originally posted by cvkk2010 Team,Please help me with the QueryI have Two TablesTable 1 (Email_Assignment_Assignee) ==> Account_Number, Call_Type, Agent_Name, Assignee, ID(Identity, Primary Key)Table 2: (Email_Agents) ==> ID(Identity, Primary Key), Assignee_Name, LimitEmail_Agents table contains the Assignee Names to whom Account numbers to be assigned and the Limit will give numbers of Account numbers should be assigned.By Default the Assignee field will be NullI need the query to run the update which should update the names in the Assignee table based on the limitPlease Assist.Thanks in Advance.
Where's the field in Agents table which indicates which agent got assigned last in previous run? without that you wont be able to start from the next agent as per your requirement during each run.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
cvkk2010
Starting Member
5 Posts |
Posted - 2013-07-01 : 08:59:55
|
Please let me know what modifications needs o be done and how i can do it further.quote: Originally posted by visakh16
quote: Originally posted by cvkk2010 Team,Please help me with the QueryI have Two TablesTable 1 (Email_Assignment_Assignee) ==> Account_Number, Call_Type, Agent_Name, Assignee, ID(Identity, Primary Key)Table 2: (Email_Agents) ==> ID(Identity, Primary Key), Assignee_Name, LimitEmail_Agents table contains the Assignee Names to whom Account numbers to be assigned and the Limit will give numbers of Account numbers should be assigned.By Default the Assignee field will be NullI need the query to run the update which should update the names in the Assignee table based on the limitPlease Assist.Thanks in Advance.
Where's the field in Agents table which indicates which agent got assigned last in previous run? without that you wont be able to start from the next agent as per your requirement during each run.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs
|
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-02 : 02:19:03
|
ideally you need something likeTable 1 (Email_Assignment_Assignee) ==> Account_Number, Call_Type, Agent_Name, Assignee, ID(Identity, Primary Key)Table 2: (Email_Agents) ==> ID(Identity, Primary Key), Assignee_Name, Limit,IsLastAssigned (bit field)then you can use the same method as I suggested in other post. Just replace table and columnnames with actual ones------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
|
|
|
|
|