5 Replies Latest reply: Aug 25, 2013 8:22 AM by Gysbert Wassenaar RSS

    Join the two tables in between two field values

    Srikanth P

      Hello Folks, I am looking for solution how to join two tables in between field values.

      TAB1:

      IDMARKETIDEND_TIMESTART_TIMEVALUE
      11640MPX268/14/2013 5:16:27 PM8/14/2013 11:02:45 AM22477
      11642MPX268/14/2013 2:14:11 AM8/14/2013 12:47:01 AM5226

       

      TAB2:

      MARKETIDTIMEWONUMBERUSER
      PX268/14/2013 1:06:27 PMP035687x-schanta
      PX268/14/2013 2:06:47 AMP034676x-david

       

      I want join these tables on MARKTID and TIME (TAB2) must be fall in b/n START_TIME and END_TIME (TAB1).

       

      OUTPUT:

      IDMARKETIDEND_TIMESTART_TIMEVALUEWONUMBERUSERTIME
      11640PX268/14/2013 5:16:27 PM8/14/2013 11:02:45 AM22477P035687x-schanta8/14/2013 1:06:27 PM
      11642PX268/14/2013 2:14:11 AM8/14/2013 12:47:01 AM5226P034676x-david8/14/2013 2:06:47 AM

       

      Any thoughts, how to achieve this ?

       

      Thanks in Advance...