3 Replies Latest reply: May 31, 2013 1:03 AM by Vivien TEXIER RSS

    Timestamp Range Lookup -- Help Please

    Srikanth P

      Hi Folks, I am trying to add the SHIFT_NAME based on the Timestamp. Below is the time Ranges.

      6AM - 6PM --> SHIFT A

      6PM - 6AM --> SHIFT B

       

      Please find the below some Sample data:

       

      ID  TIMESTAMP                 SHIFT_NAME

      1   5/30/2013 07:10:10 AM   5/30/2013-A

      2   5/30/2013 05:59:59 AM   5/29/2013-B

      3   5/30/2013 02:19:68 AM   5/29/2013-B

      4   5/29/2013 05:10:10 PM   5/29/2013-A

      5   5/29/2013 12:10:34 PM   5/29/2013-A

      6   5/29/2013 09:10:10 AM   5/29/2013-A

       

      The Bold values are desired out put.

       

      I have very large data set around 4M of data. So please provide best optimal way to achieve this.