If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
setting parameters for numbers in a column
I need to have a column that only numbers 1-20, with a repeat numerical
system of 1 - 20 for a database of 200. The project: breaking down 200 employees into groups of 10 so I need to number them 1-20 since we'll have 20 groups. I wasn't finding the solution in the help section. |
#2
|
|||
|
|||
setting parameters for numbers in a column
Try this --
SELECT Q.EmpID, Q.Employee, (((SELECT Count(*) FROM [tblEmployee] [XX] WHERE [XX].[EmpID] Q.[EmpID])+1)\10)+1 AS My_Group FROM tblEmployee Q ORDER BY Q.[EmpID]; -- Build a little, test a little. "Tammy" wrote: I need to have a column that only numbers 1-20, with a repeat numerical system of 1 - 20 for a database of 200. The project: breaking down 200 employees into groups of 10 so I need to number them 1-20 since we'll have 20 groups. I wasn't finding the solution in the help section. |
Thread Tools | |
Display Modes | |
|
|