Hi Experts,
I want to compare data in source and target tables.
I want to check column wise total number of records and number of nulls in both source and target tables.
If counts are matching then it should display matching other wiase it should display not matching.
Source table
TABLE_S
SNUM SNAME SLOC GRADE
100 RAJESH HYD A
200 BLR A
300 KUMAR VTZ A
400 SIVA VTZ D
500 RUSTI DLH D
100 MEGHA DLH
Target table
TABLE_T
SNUM SNAME SLOC GRADE
100 RAJESH HYD A
200 BLR A
300 KUMAR VTZ A
400 SIVA VTZ D
500 RUSTI
100 MEGHA DLH
I want to check column wise total number of records and number of nulls in both source and target tables.
If counts are matching then it should display matching other wiase it should display not matching.
for
SNUM it should display matching.
SNAME it should display matching.
SLOC it should display not matching.Since in target table(TABLE_T) 1 null value for SLOC column where as in source table(TABLE_S) no nulls.
GRADE it should display not matching.Since in target table(TABLE_T) 2 nulls for GRADE column where as in source table(TABLE_S) 1 null.
Please help me to write SQL query.
Thanks in advance.