A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

setting parameters for numbers in a column



 
 
Thread Tools Display Modes
  #1  
Old October 20th, 2009, 07:50 PM posted to microsoft.public.access.tablesdbdesign
Tammy
external usenet poster
 
Posts: 534
Default 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  
Old October 20th, 2009, 10:21 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.