I'm trying to create a temporary table needed for another query. This table has multiple records per group as shown. I want to insert a new field (SeqNo) that basically is the seq# of the records within the group. It starts with 1 and increment by 1 for each same MemNum.
Select MemNum, SeqNo, AffCode
From table1
order by MemNum
MemNum SeqNo AffCode
123 1 456
123 2 457
123 3 452
124 1 522
124 2 325
124 3 225
124 4 337
125 1 252
125 2 335
Thank you in advanced
V
Select MemNum, SeqNo, AffCode
From table1
order by MemNum
MemNum SeqNo AffCode
123 1 456
123 2 457
123 3 452
124 1 522
124 2 325
124 3 225
124 4 337
125 1 252
125 2 335
Thank you in advanced
V