update vs4tarcreditnote set trcnoldsubtotal=(select tivotaxbase from vs4tarinvoice where vs4tarinvoice.tivono =  vs4tarcreditnote.trcntivono)
where trcnoldsubtotal is null or trcnoldsubtotal = 0

update vs4tarcreditnote set trcntempcode=(select tivotempcode from vs4tarinvoice where vs4tarinvoice.tivono =  vs4tarcreditnote.trcntivono)
where trcntempcode is null or trcntempcode = ''

update vs4tarcreditnote set trcnsalename=(select tempfullname from vs4temployee where vs4temployee.tempcode =  vs4tarcreditnote.trcntempcode)
where trcnsalename is null or trcnsalename = ''