Home Forums SQL Server 2008 T-SQL (SS2K8) comparison in the merge statement about null values RE: comparison in the merge statement about null values

  • Because I have quite a few <> comparisons in my sql, ( in my post it is just a part of them), if I write something like :

    Student.WithdrawDate <> esis.WithdrawDate

    OR (student.WithdrawDate is NULL AND esis.WithdrawDate is NOT NULL)

    OR (student.WithdrawDate is NOT NULL AND esis.withdrawdate is NULL)

    It will get very long, is it an easier way to do it?

    can I use isnull(student.mailingaddress,'')<>isnull(esis.mailingaddress,'')

    Thanks