Hi radoulov
Thanks. I need additional information. Please help me.
The two files are obtained from two test environments. Here one table and its statistics in the format said might be present in file1 but not in file2. Same way table and its statistics present in file2 might not be present in file1.
In this case the code has to be modified in such a way that there is additional information in the output saying that the table present in one file is not present in the other.
For e.g
The contents of file1 are
FT_T_CAVJ COUNT:22117022
FT_T_CAVJ CURR_TL SUM:5.2621E+13 MAX:2432919 MIN:2336485 AVG:2379195.7
FT_T_CAVJ JRNL_CRVL_AMT SUM:5.4881E+10 MAX:495687276 MIN:-178235551 AVG:2481.41038
FT_T_CAVJ ORIG_CRVL_AMT SUM:0 MAX:0 MIN:0 AVG:0
EMBARCADERO_EXPLAIN_PLAN COUNT:0
EMBARCADERO_EXPLAIN_PLAN PARTITION_ID SUM:5.4881E+10 MAX:495687276 MIN:-178235551 AVG:2481.41038
EMBARCADERO_EXPLAIN_PLAN PARTITION_START SUM:0 MAX:0 MIN:0 AVG:0
File2 contains
FT_T_CAVJ COUNT:22117022
FT_T_CAVJ CURR_TL SUM:5.2621E+13 MAX:2432919 MIN:2336585 AVG:2379195.7
FT_T_CAVJ JRNL_CRVL_AMT SUM:5.4881E+10 MAX:495697276 MIN:-178335551 AVG:2481.41038
FT_T_CAVJ CRVL_JRNL_ID SUM:221170220
FT_T_CAVJ CRVL_TYP
CAVJ_VRFY_PRE COUNT:115
CAVJ_VRFY_PRE BAL_DIFFERENCE SUM:6409.44 MAX:457.01 MIN:-399.99 AVG:55.7342609
CAVJ_VRFY_PRE CAVA_AMT SUM:182628580 MAX:33744800.9 MIN:-2851167.2 AVG:1588074.61
Here file2 contains additional columns which are not present in file1. They are CRVL_JRNL_ID and CRVL_TYP .
File1 contain a column ORIG_CRVL_AMT which is not present in file2.
And file2 also contains an additional table named "CAVJ_VRFY_PRE " and its statistics. This is not present in file1.
Table name EMBARCADERO_EXPLAIN_PLAN is present in file1 but not in file2.
The output should be in this format
Column CURR_TL in the table FT_T_CAVJ has mismatches
FT_T_CAVJ CURR_TL SUM:5.2621E+13 MAX:2432919 MIN:2336485 AVG:2379195.7
FT_T_CAVJ CURR_TL SUM:5.2621E+13 MAX:2432919 MIN:2336585 AVG:2379195.7
Column CRVL_JRNL_ID is present in file2 but not in file1.
Column CRVL_TYP is present in file2 but not in file1.
Table EMBARCADERO_EXPLAIN_PLAN is present in file1 but not in file2.
EMBARCADERO_EXPLAIN_PLAN COUNT:0
EMBARCADERO_EXPLAIN_PLAN PARTITION_ID SUM:5.4881E+10 MAX:495687276 MIN:-178235551 AVG:2481.41038
EMBARCADERO_EXPLAIN_PLAN PARTITION_START SUM:0 MAX:0 MIN:0 AVG:0
Table CAVJ_VRFY_PRE is present in file2 but not in file1.
CAVJ_VRFY_PRE COUNT:115
CAVJ_VRFY_PRE BAL_DIFFERENCE SUM:6409.44 MAX:457.01 MIN:-399.99 AVG:55.7342609
CAVJ_VRFY_PRE CAVA_AMT SUM:182628580 MAX:33744800.9 MIN:-2851167.2 AVG:1588074.61
Kindly help me in doing this.