SQL Server Performance

problem with count date between

Discussion in 'SQL Server 2005 Reporting Services' started by sun919, Oct 12, 2006.

  1. sun919 New Member

    Hi there
    i m newbie to this sql report thing and would like to ask a simple question regarding date
    I m trying to Count the no. of Date that are register after 1May 2006 from the table unfortunately the comparision date is not as i was expected since when i did it it give me error on syntax
    here is what i ve wrote

    =Count(Fields!Register.Value, "PatientDataSet_Patient" >= DateSerial(2006,05,01))
    I ve try to replace Count with CountRows and still give me error
    so how do u deal with date in this sceanario

    many thanks
  2. ndinakar Member

    Use an IIF to return a 0 or 1 depending on your condition and then throw a SUM around it at the footer.

    Dinakar Nethi
    SQL Server MVP

Share This Page