Need an easier way to compare fields!!!!!!!!
Posted on 2007-08-07
We have developed a auditing file for or order billing system.
There are 3 main files where with a trigger on them that captures the before and after image of a record as well as some other tracking information such as User, File, Library.
Because I am captureing data from 3 different files I am storing the before and after image in 2 fields as one large string.
Now we want to create the inquiry/reporting over the audit data.
Here's my question.
I would like to be able to refer to fields as an index of some sort. I need to compare the before and after image field by field to determine what fields changed during the transaction. There are many fields in these files.
Is it possible, using a array, data structure to refer to field names by some sort of index.
I am not thrilled about having to compare each field by name
If BeforeCustomer = AfterCustomer;
Change = 'Y';
I would like to be able to do something like this
x = 1
DoU X = 56; // 56 Fields in record
If BeforeFields(x) <> AfterFields(x);
Change(x) = 'Y';
Any help is much appreciated