Field A is the account number (AP account # or AR account #)that is selected by the user when doing a transaction
Field 2 is the cash account, which the money is pulled from or put into when the account is selected in field A. Field 2 is transparent to the user. This data is in TableA (which is the general transaction table).
Field 2 is then appended to the table B ( which is the history table).
For some reason, we find field 2 in the tableB referencing the wrong account #.
How can we set it to where, when field 2 do is appended in the tableB, SQl needs to verify that is it the similar to field 1 in table A