Print 'Doing pre run Checks to ensure script not already run'; Select * from Script_History where Script_Name='NewGoldSeller31012024'; if @@ROWCOUNT!=0 BEGIN RAISERROR('THIS SCRIPT HAS ALREADY BEEN RUN ON THIS SERVER, CANNOT CONTINUE, PLEASE CONTACT DEV',11,1); RETURN; END GO if (select count(1) from seller where First_Name = 'The Metal Collector - P van Zyl') = 0 begin insert into seller (First_Name, Surname, Cell_Number, Email_Address, Identity_Type_ID, ID_Number, Address_1, Address_2, Suburb, Postal_Code, City_ID, Gender, CompanyVatNo, CompanyRegNo, Customer_Type_ID, IsGoldVendor) values ('The Metal Collector - P van Zyl', 'Knysna - Branch - Henk Barnard', '078-538-0373', 'hnkbarnard@gmail.com', 2, '6509035098080', 'Shop 1, 24 Main Street', '', 'Knysna', '6571', (select top(1) City_ID from City), 'M', '4040199053', 'N/A', 3, 1) end GO Print 'Insert into script history if everything else is cool'; Insert into Script_History (RunDate,Script_Name) Values (CURRENT_TIMESTAMP,'NewGoldSeller31012024'); IF @@ERROR != 0 BEGIN RAISERROR ('UNABLE TO CONTINUE WITH SCRIPT', 11, 1); RETURN; END GO