- Local time
- Today, 12:30
- Joined
- Jan 23, 2006
- Messages
- 15,533
I have a routine to create a table (LKX), the table has 1 field(firstName), that field is a unique index. I want LKX to have only DISTINCT values.
When I try to loop through other tables(A,B,C) and Insert the selected field(firstName) values from A,B and C to Table LKX, the firstnames from A are appended. The values from B and C are not. There are 27 unique firstnames in A, 45 firstnames in B (6 are duplicates) so 39 new values are expected--giving 27+39 =66 values in LKX. Table C is a copy of A with 1 changed firstname, so I expect 1 new value from C. So eexpecting 66 +1 = 67 records in LKX final count.
BUT there are only 27 records in LKX???
I do have code to trap error 3022 (attempt to add duplicate) and Resume Next.(bypassing the error).
Any ideas, suggestions? Attempting to help poster here
Thanks in advance.
When I try to loop through other tables(A,B,C) and Insert the selected field(firstName) values from A,B and C to Table LKX, the firstnames from A are appended. The values from B and C are not. There are 27 unique firstnames in A, 45 firstnames in B (6 are duplicates) so 39 new values are expected--giving 27+39 =66 values in LKX. Table C is a copy of A with 1 changed firstname, so I expect 1 new value from C. So eexpecting 66 +1 = 67 records in LKX final count.
BUT there are only 27 records in LKX???
I do have code to trap error 3022 (attempt to add duplicate) and Resume Next.(bypassing the error).
Any ideas, suggestions? Attempting to help poster here
Thanks in advance.