UPDATE VS4TAPInvoiceMBAOL SET TIPATJobNo=(SELECT TIAPTJOBNo FROM VS4TAPInvoice WHERE VS4TAPInvoice.TIAPNo=VS4TAPInvoiceMBAOL.TIPATIPMTIAPNo) WHERE TIPATJobNo is null or TIPATJobNo = ''
GO
UPDATE VS4TAPInvoiceMBAOL SET TIPATJobNo='' WHERE TIPATJobNo is null
GO


UPDATE VS4TAPInvoiceMBAOL SET TIPATPrjCode=(SELECT TJobTPrjCode FROM VS4TJob WHERE VS4TJob.TjobNo=VS4TAPInvoiceMBAOL.TIPATJobNo) WHERE TIPATJobNo <> ''
GO
UPDATE VS4TAPInvoiceMBAOL SET TIPATPrjCode='' WHERE TIPATJobNo is null
GO