Comparing table results in BTEQ scripts

Database
Enthusiast

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

3 REPLIES
Enthusiast

Re: Comparing table results in BTEQ scripts

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.

Enthusiast

Re: Comparing table results in BTEQ scripts

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

Supporter

Re: Comparing table results in BTEQ scripts

Example Java UDF for Table Hash Calculations

and the refering post might give you an idea