Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate sequential numbers between 2 numbers 1

Status
Not open for further replies.

FeS2

Technical User
Aug 16, 2002
82
0
0
US
In Access 2007, I am trying to figure out a way to take a number like 2271100 and then generate and insert into a table the remaining sequence of numbers up to 2271199, ie.. 2271101, 2271102 ...

I am wanting to do this using a query but have searched around and only been able to find how to do it in Oracle or T-SQL, not in Access.

Any help would be appreciated.

Thanks
 
Create a table of integers with one field (Num) and load it with the integers 0-9. Then
Code:
Select 2271100 + (I1.Num*10 + I2.Num) INTO SomeTable 

From Integers As I1, Integers As I2

Where I1.Num*10 + I2.Num < 100
 
This is exactly what I was needing. Thank you guys for the quick reply
 
Rudy said:
"stole" is not the right word at all
Plagerized? Pilfered? Absconded With? Expropriated?
Work with me here.

Rudy said:
how's everything?
Well, I'm terribly worried about the baggage retrieval system at Pearson.
Other than that ... fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top