GO if (select count(0) from System_Default where Default_Name = 'Main_Store_ID' and Default_Value in (4, 7, 8, 51, 119, 132, 157, 163, 192, 223, 245, 252, 259, 261, 266, 268, 269, 273, 280, 281, 282, 284, 285, 293, 294, 303 )) > 0 UPDATE SystemSetting SET SettingValueDecimal = '18' WHERE SettingKey = 'ProjectionPeriod' go Print 'If you see rows affected means it updated and ran script if you just see this message means nothing was updated'; GO if (select count(0) from System_Default where Default_Name = 'Main_Store_ID' and Default_Value in (4, 7, 8, 51, 119, 132, 157, 163, 192, 223, 245, 252, 259, 261, 266, 268, 269, 273, 280, 281, 282, 284, 285, 293, 294, 303 )) > 0 UPDATE SystemSetting SET SettingValueBit = 0 WHERE SettingKey = 'ProjectionPeriodEnabled' --DONT ALLOW THE DAYS TO BE CHANGED go