1 Reply Latest reply on Jul 27, 2012 5:39 AM by Johnreardon

    Date Range


      My Requirement is to pull the data from the certain table based on the start and End date.
      For example i have the below structure of the table

      Userid StartDate EndDate
      101 01/05/2012 12/31/9999
      102 01/04/2012 01/06/2012
      103 03/20/2012 01/05/2012

      Like this the dates will be there. Now i want to pull all the records for duration 01/05/2012 to 05/31/2012. Do i need to use the between function or
      i should use the below Query

      SELECT * FROM T1 where Startdate<='05/31/2012' and Enddate>='01/05/2012'.

      Thanks for your response