I just discovered ESquared and donutman's discussion of adding a sequence number to a table using a update query instead of a cursor. The thread I reference is at thread183-859372.
In my case I need to take it one step farther and reference two columns as a key instead of one.
My data looks like this:
Field 1 Field 2
8175 1
8175 1
8175 2
8175 2
8175 2
8180 1
8180 2
8180 2
The results would be:
Field 1 Field 2 SeqNumber
8175 1 1
8175 1 2
8175 2 1
8175 2 2
8175 2 3
8180 1 1
8180 2 1
8180 2 2
I tried to retrofit there solution into my procedure but I'm having trouble with the coding and I'm not sure it can be done.
If I can solve this problem I can eliminate 3 cursors from my system.
Has anyone else tried the above with ESquared or donutman's solution or am I stuck with cursors?
Any assistance would be appreciated.
In my case I need to take it one step farther and reference two columns as a key instead of one.
My data looks like this:
Field 1 Field 2
8175 1
8175 1
8175 2
8175 2
8175 2
8180 1
8180 2
8180 2
The results would be:
Field 1 Field 2 SeqNumber
8175 1 1
8175 1 2
8175 2 1
8175 2 2
8175 2 3
8180 1 1
8180 2 1
8180 2 2
I tried to retrofit there solution into my procedure but I'm having trouble with the coding and I'm not sure it can be done.
If I can solve this problem I can eliminate 3 cursors from my system.
Has anyone else tried the above with ESquared or donutman's solution or am I stuck with cursors?
Any assistance would be appreciated.