It's a good job I only made that change on a test DB then! If i run the SQL from within SSMS the SP executes perfectly, but the plan was to create a windows scheduled task and schedlue that to run every Sat night. SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO/*EXEC mp_whsStockWatch_viewsWTableMTS2BKUP# Updated: 22/12/2010 - Because mp_whsStockWatchMTS2BKUP has a computed coulmn added I've had to add SET ARITHABORT ON*/ALTER PROCEDURE [dbo].[mp_whsStockWatch_viewsWTableMTS2BKUP]AS--SET NOCOUNT ONSET ARITHABORT ON --GOBEGININSERT INTO mp_whsStockWatchMTS2BKUPSELECT MAX(Category1) AS Category1, Region, Site, Area, MAX(Category2) AS Category2, MAX(COALESCE(Category3, 'NULL')) AS Category3, --MAX(Category3) AS Category3, MAX(COALESCE(Category7, 'NULL')) AS Category7, --MAX(Category7) AS Category7, Resource, MAX(COALESCE(Description, 'NULL')) AS Description, --MAX(Description) AS Description, SUM(Quantity) AS Quantity, MAX(UM) AS UM, SUM(EURValue) AS EURValue, SUM(GBPValue) AS GBPValue, MAX(Price) AS Price, MAX(Currency) AS Currency, QAStatus, Days, CAST(CONVERT(DATETIME,GETDATE(),105) AS VARCHAR(35)) AS CurrDate, AgeFROM mp_whsStockWatchVw1GROUP BY Region, Site, Area, Resource, UM, QAStatus, Days, AgeORDER BY Category1ENDGOSET ANSI_NULLS OFFGOSET QUOTED_IDENTIFIER OFFGO
as you can see the code is only selecting data from one table and backing it up in another so i don't understand why there would be any overflow or divide-by-zero errors happening