SQL Server Performance

Parameter Date validation

Discussion in 'SQL Server 2005 Reporting Services' started by shivi, Jul 24, 2007.

  1. shivi New Member

    Hello,

    In my report I am getting the 'FROM' date and 'TO' date as parameters .Is it possible to validate the 'TO' date to check if it is always greater than or equal to FROM date.
    This can be handled by the application source code.
    But I would like to know if sql server reporting services is having the option to do this validation
    Thanks,
    Shivi
  2. spirit1 New Member

    what is wrong with simply
    maybe
    select ....
    from ....
    where yourDateCol between @from and @to

    _______________________________________________
    Causing trouble since 1980
    blog:http://weblogs.sqlteam.com/mladenp
  3. satya Moderator

    FYI, it is better to handle on application code than using that on RS side, check what Spirit suggested.

    Satya SKJ
    Microsoft SQL Server MVP
    Writer, Contributing Editor & Moderator
    http://www.SQL-Server-Performance.Com
    @http://www.askasqlguru.com/

    This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
  4. shivi New Member

    Spirit,

    No, if the 'to' date is < 'from' date then it will not give any records.

    Anyway thanks for your replies..

    Regards,
    Shivi

Share This Page