V
Vika
Is it possible to create a query that will assign a sequence number t
the records and append it to the table
I need a query that compares records from table 1 to table 2. If ther
are new records in table 1, the query has to look up the last sequenc
number in the table 1, then assign a sequence number to new record
and append it to the table 2
Here is what I have tried
1. Created a query that matches records in table 1 and table
2. Created a query that appends sequential number from table 1 t
matching records in table
3. Created a qryMaxSeqNO query that uses a DMax function to look u
max sequence number in table
4. Created a qryRunningSeqNO query from qryMaxSeqNo query that uses
function RunningTotal:[MaxSeqNO]+
5. Created a query that assigns a sequential number to the new record
using table 1(where SeqNo is Null) and qryRunningSeqNO query
(Fields:RunningTotal(from qryRunningSeqNO), and all fields from th
table 1
The problem is that the sequence number that query assigns to the ne
records is not sequential. It looks up for maximum sequence number i
the table 1, adds 1 and then assigns the same number to all the ne
records that are found in table 2. For example, if the maximu
sequence number in table 1 is 450; all the new found records in tabl
2 will have a sequence number 451.
Thank you very much for any help
Vik
the records and append it to the table
I need a query that compares records from table 1 to table 2. If ther
are new records in table 1, the query has to look up the last sequenc
number in the table 1, then assign a sequence number to new record
and append it to the table 2
Here is what I have tried
1. Created a query that matches records in table 1 and table
2. Created a query that appends sequential number from table 1 t
matching records in table
3. Created a qryMaxSeqNO query that uses a DMax function to look u
max sequence number in table
4. Created a qryRunningSeqNO query from qryMaxSeqNo query that uses
function RunningTotal:[MaxSeqNO]+
5. Created a query that assigns a sequential number to the new record
using table 1(where SeqNo is Null) and qryRunningSeqNO query
(Fields:RunningTotal(from qryRunningSeqNO), and all fields from th
table 1
The problem is that the sequence number that query assigns to the ne
records is not sequential. It looks up for maximum sequence number i
the table 1, adds 1 and then assigns the same number to all the ne
records that are found in table 2. For example, if the maximu
sequence number in table 1 is 450; all the new found records in tabl
2 will have a sequence number 451.
Thank you very much for any help
Vik