Sequence number

G

Guest

I need to add a sequence number to a table.

Most likely this will break normalization rules, BUT that's okay for this
applet.

I am comparing data in two tables. Matching criteria is (say) 5 fields of
10. Tricky part is that there is NO unique identifier in the data.

For simplicity sake, I'll say I'm comparing 2 tables with one field each.

Here are possible records
T1 T2
-------------------------------- -----------------------------------
A A
A A
B A
B B
C B
C D
D D
D D

Basically what I need to do is have a one for one match, and then show (from
each table) what falls out.

I was thinking if I could add a sequence number, by 'key' I could then do
inner joins to find and remove matches..

So My tables would look like this

T1 T2
'key' Sequence 'key' Sequence
-------------------------------- -----------------------------------
A 1 A
1
A 2 A
2
B 1 A
3
B 2 B
1
C 1 B
2
C 2 D
1
D 1 D
2
D 2 D
3


The data is brought into the db by using a linked table and append queries..
So I can 'add' the sequence # to the actual table...

I've got it 'working' now by downloading to Excel and putting the data side
by side, but would prefer doing it in access..

Thanks
Tom
 
J

John Nurick

Hi Tom,

If I understand you right,

(a) One way to get a sequential number is just to create a new table with
the fields you need, plus an autonumber field. Then run an append query to
move the records from the linked table.

(b) But if you just want to find records in one table that don't have
counterparts in the other, you don't need to add anything: just use the Find
Unmatched query wizard.
 

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