IF NOT EXISTS (SELECT * FROM DataAccessLayer.TableMetaData WHERE TableName = 'Transaction')
BEGIN
	INSERT DataAccessLayer.TableMetaData
	VALUES ('Transaction', '2020-01-01T00:00:00.000', NULL, 'Upper')
End

UPDATE md
SET md.BoundaryDateTime = '2020-01-01T00:00:00.000', md.BoundaryType = 'Upper'
FROM DataAccessLayer.TableMetaData md
WHERE md.TableName = 'Transaction'