[Solved] Tsql compare two field in the result set


How about:

SELECT w.adharno,
       w.phone w_phone,
       descrip_w,
       amount_w,
       a.phone a_phone,
       decrip_a,
       amount_a
FROM table_w w
JOIN table_a a ON a.adharno = w.adharno
              AND w.descrip_w = a.decrip_a
              AND (w.phone <> a.phone
                OR w.amount_w <> a.amount_a)

solved Tsql compare two field in the result set