UPDATE VS4TInvoice set tivotbracode=(SELECT TOP 1 TBraCode from vs4tbranch WHERE TBraTBRTAlias='HEADOFFICE') where tivotbracode='' or tivotbracode is null

UPDATE VS4TTeasuryTrans set ttettbracode=(SELECT TOP 1 TBraCode from vs4tbranch WHERE TBraTBRTAlias='HEADOFFICE') where ttettbracode='' or ttettbracode is null

UPDATE VS4TCashDeposit set tDPStbracode=(SELECT TOP 1 TBraCode from vs4tbranch WHERE TBraTBRTAlias='HEADOFFICE') where tdpstbracode='' or tdpstbracode is null