How can I add a field to an existing query to include a sequential list of numbers (e.g. 1, 2, 3, 4) repeating?
for example, I want to add an "Assignment" column. This column corresponds with another query where we have four people assigned one of these four numbers (some days the list may be five, other days it could be three).
The idea is that we want to evenly distribute the task list to this group. Many times, this list can get well into the hundreds, and it would be unfair if one person is assigned significantly more tasks than another person.
see below as an example of what I'm trying to achieve.
if it helps, the data is coming from a temp local table, which will then be appended to a SQL server for multiple users. Not sure if I can create an autonumber field and have it tied to the query of assignees to determine how high the sequence of numbers should go.
thanks!
Field1 Field2 Field3 Assignment
a 123 Chicago 1
b 231 LA 2
c 456 New York 3
d 796 Atlanta 4
e 5423 Baltimore 1
f 451 Toronto 2
g 33 Austin 3
h 12 Miami 4
i 19085 Seattle 1
j 4536 Phoenix 2
apologies for the poorly formatted table, but when I tried to copy and paste from Excel, it left off the data from the two right columns.
for example, I want to add an "Assignment" column. This column corresponds with another query where we have four people assigned one of these four numbers (some days the list may be five, other days it could be three).
The idea is that we want to evenly distribute the task list to this group. Many times, this list can get well into the hundreds, and it would be unfair if one person is assigned significantly more tasks than another person.
see below as an example of what I'm trying to achieve.
if it helps, the data is coming from a temp local table, which will then be appended to a SQL server for multiple users. Not sure if I can create an autonumber field and have it tied to the query of assignees to determine how high the sequence of numbers should go.
thanks!
Field1 Field2 Field3 Assignment
a 123 Chicago 1
b 231 LA 2
c 456 New York 3
d 796 Atlanta 4
e 5423 Baltimore 1
f 451 Toronto 2
g 33 Austin 3
h 12 Miami 4
i 19085 Seattle 1
j 4536 Phoenix 2
apologies for the poorly formatted table, but when I tried to copy and paste from Excel, it left off the data from the two right columns.
Last edited: