update vs4tproduct set tpdtlastbaldate=(SELECT top 1 TInvDate FROM VS4TInventory INNER JOIN VS4TInventoryMB ON VS4TInventory.TInvNo = VS4TInventoryMB.TInMTInvNo WHERE (((VS4TInventoryMB.TInMTPdtCode)=TPdtCode)))
GO
update vs4tproduct set tpdtlastbaldate=(SELECT TSysValue FROM VS4TSystem WHERE TSysName='StartAccountDate') WHERE tpdtlastbaldate is null
GO

