General information
Category:
Coding, syntax & commands
I have a program in which I need to compare certain fields from two tables to determine if there are any changes in the values.
I have put the field names that I need to check to an array and seek both tables for matching records (by sin). Then I scan through my array which contains each field name (using a for loop). I then try to assign each alias name to the field name to compare. The field name is a variable for the current array element, and I am not sure how to reference the alias name to that variable.
My code is similar to this.
Select A
Select B
******Seek the sin I want in both tables and when found...****
x=0
For x= 1 to Alen(Afieldnames)
CField = Allt(Afieldnames[x])
If "A."+CField != "B."+CField
Replace "A."+CField with "B."+CField
Endif
Next
It is picking each field up as a string and always gets inside the If because the values aren't equal and then replaces the field with "A.FIRSTNAME" if that is the field element it is currently on.
I need to know how the syntax on how to check the field values (A.Firstname, etc...)
Any suggestions would be great.
Jolene Dicks
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only