Hi All,please can some one help me out, not great at sql and need to Help from you guru'si have a case statment that i want to check if the record exsits in another table to say 'Recent' else do a calculation but o get the Error "converting data type varchar to numeric. Warning: Null value is eliminated by an aggregate or other SET operation."please could someone point me out what im doing wrong please CASE WHEN (SELECT COUNT(ab.PrecentRecent) FROM DPY_SyncReport_Prod.Consignment.JointsRecentSummary As ab where A.ZtypeNumber = AB.ZtypeNumber and A.ProductHealthCategory = AB.ProductHealthCategory and A.ProductHealthBrand = AB.ProductHealthBrand) > 0 then 'Recent' WHEN CAST(SUM(a.TotaBasePrice) / NULLIF((ISNULL(SUM(b.SalesVale12Mth),0) / 365),0) AS Numeric(8,0)) IS NULL THEN 99999ELSE CAST(SUM(a.TotaBasePrice) / NULLIF((ISNULL(SUM(b.SalesVale12Mth),0) / 365),0) AS Numeric (8,0))END As DSI