I’m trying to update a DATETIME field in one table based on the latest date from another. The common field between the two tables is named msisdn. I was trying this
update table1 t1
join table2 t2
on t1.msisdn = t2.msisdn
set t1.bill_attempt = (Select max(event_time) from table2
where t1.msisdn = t2.msisdn)
In table1 I’m getting the latest same event time for all msisdn records. Please assist
Either:
or: