Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Compare two tables using utilities - response (2) by dnoeth

$
0
0
If you insist on a column level report you need to split all columns into rows before comparison like: select * from ( select name, 'city' as column_name, city as source_value from source_table union all select name, 'pincode', pincode from source_table ) as s full outer join ( select name, 'city' as column_name, city as target_value from target_table union all select name, 'pincode', pincode from target_table ) as t on s.name = t.name and s.column_name = t.columnname where not ((s.source_value = t.target_value) or (s.source_value is null and t.target_value is null)) Dieter

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>