Skip to Content
0
Former Member
Jul 15, 2008 at 07:22 AM

Problem in Checking and Incrementing while Looping

47 Views

See I have this problem I have table A and Table B

Let's say for example,Table A has field customer of,

1

2

3

4

5

And table b has field customer of,

3

4

5

6

I am suppose to compare A with B if A has a customer number equal to one of the values in B. It has to increment until it reaches a number not available in B. so in table A 1 is ok. 2 as well. but 3 has to be incremented to 7. 4 is next from table A next available is 7, but im suppose to make the customer field unique so next increment is 8. How do I go about doing this. Having a hard time checking while looping