[AccessD] A2k: Creating an Array from Start and End Numbers

Stuart McLachlan stuart at lexacorp.com.pg
Mon Mar 23 17:17:35 CDT 2015


That's just one of the countless uses for a "number table" i.e. a table consisting of a single 
PK field of integers from 0 to ....  Build it once when you first create your system and you can 
do things like:

"Select * from tblNumbers where num between 1024 and 1031"

That's if you want that many numbers in your table.  If don't have that large a table, then it 
would be:

"Select num + 1000 from tblNumbers where num between 24 and 31"  :)


-- 
Stuart


On 23 Mar 2015 at 0:39, Darren wrote:

> Hi All,
> I want to create a sequential array from a start number and an end
> number, that I can present as a 1 column combo list. For example: 1024
> is the start Number 1031 is the end Number
> 
> I'd like to see the following  8 items in my combo list after building
> the array. 1024 1025 1026 1027 1028 1029 1030 1031
> 
> Any pointers?
> 
> Many thanks in advance
> 
> Darren
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list