I have a query which does some mathematical calculations on my data. Some of the results are Text ('No Change' & 'Used Space Decreased') and the rest are all numerical values. Is there a way to pull out only the entries which have a numeric value bigger than 0?
I've tried adding 'WHERE [TableName].[TimeLeft] >0' but it doesn't work.
thoughts?
Code:
SELECT [7LUNQuery].SANName, [7LUNQuery].AggregateName, [7LUNQuery].LUNName, Int(Round(([7LUNQuery].FirstUsedAmount)/1024^2,0)) AS FirstUsedAmountGB, Int(Round(([7LUNQuery].LastUsedAmount)/1024^2,0)) AS LastUsedAmountGB, Int(Round(([7LUNQuery].FirstTotalAmount)/1024^2,0)) AS FirstTotalAmountGB, Int(Round(([7LUNQuery].LastTotalAmount)/1024^2,0)) AS LastTotalAmountGB, FirstTotalAmountGB-FirstUsedAmountGB AS FirstFreeAmountGB, LastTotalAmountGB-LastUsedAmountGB AS LastFreeAmountGB, Int(Round((FirstUsedAmountGB/FirstTotalAmountGB)*100,0)) AS FirstPercentageAmount, Int(Round((LastUsedAmountGB/LastTotalAmountGB)*100,0)) AS LastPercentageAmount, LastUsedAmountGB-FirstUsedAmountGB AS DifferenceUsedAmountGB, DateDiff("d",(Forms![FrontPage]![SelectStart]),(Forms![FrontPage]![SelectEnd])) AS DateDifference, Int(Round((DifferenceUsedAmountGB/DateDifference),0)) AS DailyIncreaseAmountGB, IIf([DailyIncreaseAmountGB]=0,'No Change',IIf([DailyIncreaseAmountGB]<0,'Used Space Decreased',Int(Round(LastFreeAmountGB/IIf(DailyIncreaseAmountGB=0,'Null',DailyIncreaseAmountGB),0)))) AS TimeLeft
FROM 7LUNQuery;