All Forums Database
Chaitu1015 5 posts Joined 10/15
29 Oct 2015
Comparing table results in BTEQ scripts

Is there anyway that we can compare 2 SQL's in a BTEQ script. Please do let me know.
I am trying to compare 2 table results and writing it to a log file. Thanks for your time.
 
Thanks,
C

kirthi 65 posts Joined 02/12
29 Oct 2015

If you want to compare the results of 2 SQLs ( having similar attributes)
using Minus could be an option.
 
{SQL1}
MINUS
(SQL2}
 
this will give non matching records in SQL1, when you do the reverse you can get the non-matching records in SQL 2.

Chaitu1015 5 posts Joined 10/15
30 Oct 2015

Thanks for your reply.
 
I am aware of MINUS operator in SQL but I just want to know if there is any other library/function in BTEQ to compare the results of two tables?
 
Please do let me know.
 
Thanks

ulrich 816 posts Joined 09/09
31 Oct 2015

Example Java UDF for Table Hash Calculations
and the refering post might give you an idea

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

You must sign in to leave a comment.