Help Generating Sequence Numbers Predefined #'s and Ranges

A

AccessNovice

I've got a list of over 2,000 unique ID's... These ID's are associated
with specific projects. Trying to figure out a quick and easy way to
generate sequence numbers that correspond with each ID. The number of
sequence numbers per unique ID will vary based on individual project
capacity. Some ID's will have as few as 25 sequence numbers associated
some as many as 100... Would result in the following outcome if sequence
#'s increment by 33...

Ex.
Where Unique ID = 1234500123; and Project Capacity = 25
Beginning with number 1234500123
Resulting Sequence Numbers: 1234500123, 1234500156, 1234500189,
1234500222, etc… ending with 1234500948

Where Unique ID = 1234500123; and Project Capacity = 100
Beginning with number 1234500123
Resulting Sequence Numbers: 1234500123, 1234500156, 1234500189,
1234500222, etc… ending with 1234503423

Can anyone help - any ideas? Ideally I'd be able take my existing
table, look at all 2,000 plus values in the Unique ID column compare
them to the Project Capacity column and spit out a new table of
incremented sequence numbers...
 
K

KARL DEWEY

Create a table named CountNumber with field CountNUM containing numbers from
zero through your maximum sequence lenght.

SELECT PROJECT.UniqueID, [UniqueID]+([CountNUM]*33) AS [Resulting Sequence
Numbers], CountNumber.CountNUM, [Enter Project Capacity] AS Expr1
FROM CountNumber, PROJECT
WHERE (((CountNumber.CountNUM)<=[Enter Project Capacity]))
ORDER BY [UniqueID]+([CountNUM]*33);

The sequence #'s increment by 33 but you could put a parameter prompt
instead of the number.
 
A

AccessNovice

Thanks so much for posting!!!!! Hoping you help me once again - When I
attempt executing I get a syntax error... I've checked all the
bracketting - everything seems to be in order... Any feedback on what
I'm doing wrong?
 
K

KARL DEWEY

Did you remove the hard returns that copying and pasting puts in the post?
Post your SQL back.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top