Table ‘m‘ is specified twice, both as a target for ‘UPDATE‘ and as a separate source for data
updateTTRD_SET_INSTRUCTIONmsetm.state=casewhenm.state=-99999then0else-m.stateendwherem.inst_idin(selectinst_idfromTTRD_SET_INSTRUCTIONminnerjoinTTRD_OTC_TRADEtonm.trade_id