SQL Server Performance

Parameter Date validation

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

  1. shivi New Member


    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
  2. spirit1 New Member

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

    Causing trouble since 1980
  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

    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


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

    Anyway thanks for your replies..


Share This Page