Exclude column value on calculation

  • Hi,

    I am using this query to calucate two column values.

    select '$ '+ CONVERT(varchar,CONVERT(decimal(10,0),CONVERT(money, ISNULL(SUM(Total_Amount),0.00))),1) as Total_Amount,'$ '+ CONVERT(varchar,CONVERT(decimal(10,2),CONVERT(money, ISNULL(SUM(Monthly_Amount),0.00))),1) as Monthly_Amount from Apps where Department = 'ManLog'

    I have a date column and I want to see values only upto '2015-01-01' and I want to exclude values starting from '2016-01-01.

  • Just add to your where clause:

    AND DateColumn <= '2015-01-01'

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply