15 Replies Latest reply: Jan 4, 2013 5:39 AM by Kabilan Kumarasamy RSS

    findout date exists in an interval

      I have date information in two separate tables and i want to find if a date from table1.date exists in between date ranges of table 2 (date1.table2 and date2.table2). on the basis of the comparison i want to add a comment.

       

      TABLE1:

       

      EmployeeIDabsencedate
      000101.01.2013
      000202.02.2012
      000303.03.2012

       

      TABLE2:

       

      EmployeeIDLeaveFrom
      LeaveTo
      000112.12.201225.12.2012
      000201.02.201205.02.2012
      000303.03.201203.03.2012

       

      RESULT TABLE should be like this:

       

      EMPLOYEEIDABSENCEDATEComments
      00101.01.2013not found
      000202.02.2012found
      000303.03.2012found

       

      it would be great if i can achieve it through scripting.