Update btab as b inner join btab_prior as b2 on (b.[billing number] = b2.[billing number]) and (b.ssn = b2.ssn)
set b.[prior dom] = iif(b2.[prior dom] > cdate('01/01/1901'),b2.[prior dom],null), b.[prior contrib] = b2.[prior contrib]
btab and btab_prior are both defined same way.
Column [prior dom] is a date/time
for btab values of [prior dom] of 4/29/1904 and 3/24/1903 specifically, the iif statement returns null. Works correctly for all
other dates.
Any help would be appreciated.