L
LisaInAz
I am using Access 2002. I have a sorted table and I used the DynamicCounter
logic to number the rows 1 through end of file, as I can not use another PK.
I need to query the table starting from a row number the customer will
supply and then pull every Nth record also supplied. Row number could be
722, 1545, etc and Nth could be 10, 21, 2203 etc.
I found another post with the below suggestion which almost works however it
appears that it is not starting from the specific row number nor picking Nth
till end of file.
--
Create a table CountNumber with field CountNUM containing numbers from 0
(zero) through your maximum sequence length. Substitute your table and field
name for [Change Requests].Primary_Key and enter interval and sequence at
prompts.
SELECT [Change Requests].Primary_Key
FROM [Change Requests], CountNumber
WHERE ((([Change Requests].Primary_Key)=([CountNUM]*[Enter interval])+[Enter
sequence]));
--
My tables do contain duplicates which is fine. My tables are named and
constructed as follows:
Tbl1 - Change Requests
fld1 - Number (Long Integer)
fld2 - Text Field
Tbl2 - CounterNumber
fld - CountNUM (Long Integer)
fld2 - Number
Any Suggestions or other Posts to Consider are greatly appreciated.
logic to number the rows 1 through end of file, as I can not use another PK.
I need to query the table starting from a row number the customer will
supply and then pull every Nth record also supplied. Row number could be
722, 1545, etc and Nth could be 10, 21, 2203 etc.
I found another post with the below suggestion which almost works however it
appears that it is not starting from the specific row number nor picking Nth
till end of file.
--
Create a table CountNumber with field CountNUM containing numbers from 0
(zero) through your maximum sequence length. Substitute your table and field
name for [Change Requests].Primary_Key and enter interval and sequence at
prompts.
SELECT [Change Requests].Primary_Key
FROM [Change Requests], CountNumber
WHERE ((([Change Requests].Primary_Key)=([CountNUM]*[Enter interval])+[Enter
sequence]));
--
My tables do contain duplicates which is fine. My tables are named and
constructed as follows:
Tbl1 - Change Requests
fld1 - Number (Long Integer)
fld2 - Text Field
Tbl2 - CounterNumber
fld - CountNUM (Long Integer)
fld2 - Number
Any Suggestions or other Posts to Consider are greatly appreciated.