Print 'Doing pre run Checks to ensure script not already run'; Select * from Script_History where Script_Name='ReleaseJuly2024Week3'; if @@ROWCOUNT!=0 BEGIN RAISERROR('THIS SCRIPT HAS ALREADY BEEN RUN ON THIS SERVER, CANNOT CONTINUE, PLEASE CONTACT DEV',11,1); RETURN; END GO update System_Default set Default_Value = '2.0.3.5' where Default_Name = 'CurrentVersionNumber'; update product_brand set description = 'Xiaomi' where description = 'Redmi'; Print 'Insert into script history if everything else is cool'; Insert into Script_History (RunDate,Script_Name) Values (CURRENT_TIMESTAMP,'ReleaseJuly2024Week3'); IF @@ERROR != 0 BEGIN RAISERROR ('UNABLE TO CONTINUE WITH SCRIPT', 11, 1); RETURN; END GO