UPDATE VS4TARCreditNote Set TRCNTPrjcode=(select tivotprjcode from vs4tinvoice where trcntivono=tivono) WHERE TRCNTPrjcode is null or TRCNTPrjcode = ''
UPDATE VS4TARDebitNote Set TDBNTPrjcode=(select tivotprjcode from vs4tinvoice where tdbntivono=tivono) WHERE TDBNTPrjcode is null or TDBNTPrjcode= ''
UPDATE VS4TAPCreditNote Set TPCNTPrjcode=(select tiaptprjcode from vs4tapinvoice where tpcntiapno=tiapno) WHERE TPCNTPrjcode is null or TPCNTPrjcode = ''
UPDATE VS4TAPDebitNote Set TDENTPrjcode=(select tiaptprjcode from vs4tapinvoice where tdentiapno=tiapno) WHERE TDENTPrjcode is null or TDENTPrjcode = ''