The task at hand is to compare the data in two tables and write the mismatches to a table. There are hundreds of fields and millions of records.
The process is currently opening the the "master table" and capture each field names (SelectedField) when plug the SelectedField name into the SQL statement (for both tables).
It may be a formating issue as the sql (including the if statements and the insert work find) but I have tried so many differnet scenerios.
Here is the variable to select the field name:
SelectedField = rec.Fields(i).Name
How to insert the item above ( SelectedField ) into the SQL is the issue - example substitute dbo_Table.field_item with SelectField ((dbo_Table.field_item) Is Not Null))
I have tried using the dim variable as a string and as a field, I have tried using the rec value itself
'" & rec.Fields(i).Name & "'
I've trid putting the square brackeds and parenthesis.
I'd appreciate any help.
The process is currently opening the the "master table" and capture each field names (SelectedField) when plug the SelectedField name into the SQL statement (for both tables).
It may be a formating issue as the sql (including the if statements and the insert work find) but I have tried so many differnet scenerios.
Here is the variable to select the field name:
SelectedField = rec.Fields(i).Name
How to insert the item above ( SelectedField ) into the SQL is the issue - example substitute dbo_Table.field_item with SelectField ((dbo_Table.field_item) Is Not Null))
I have tried using the dim variable as a string and as a field, I have tried using the rec value itself
'" & rec.Fields(i).Name & "'
I've trid putting the square brackeds and parenthesis.
I'd appreciate any help.