0 Replies Latest reply: Jan 17, 2017 4:32 AM by sagar rahul RSS

    policy date

    sagar rahul

      hiii

      was having problem in writing script

      below is my problem :

      below is table

         

      POL_NUMREGISTRATION_NUMSTART_DATEDATE_OF_LOSS
      1234MH-01-CB-112307-Apr-201419-Apr-2014
      5678HP-78-BU-45608-Apr-201420-Apr-2014
      8912DL-04-CNB-78909-Apr-201421-Apr-2014
      4321MH-01-CB-112322-May-2014

       

      what i want in this :

       

      1)to check whether REGISTRATION_NUM has been rebooked with another or new  policy num

       

      eg :

       

      POL_NUM 1234 has MH-01-CB-1123

      and then

      POL_NUM 4321 has also MH-01-CB-1123

       

      as u can see there two different policy booked with same registration num which can been seen by start_date , they are different .

       

      now in output i want is :

       

      new or another policy_num which has been booked with same REGISTRATION_NUM

      and its start date should be after its date_of_loss


      as u can see below


      two policy and one REGISTRATION_NUM

      and u can see loss date is less than start date of new policy booked with same REGISTRATION_NUM

      so we want it in this form


       

      POL_NUM_TXTREGISTRATION_NUMSTART_DATEDATE_OF_LOSS
      1234/MH-01-CB-112307-Apr-201419-Apr-2014
      4321/MH-01-CB-112322-May-2014



       


       

      we will take same eg :

       

      POL_NUM 1234 has MH-01-CB-1123

      and then

      POL_NUM 4321 has also MH-01-CB-1123

       

      so out put should new policy_num ,REGISTRATION_NUM and start date

         

      POL_NUM_TXTREGISTRATION_NUMSTART_DATEDATE_OF_LOSS
      1234/MH-01-CB-112307-Apr-201419-Apr-2014
      5678/HP-78-BU-45608-Apr-201420-Apr-2014
      8912/DL-04-CNB-78909-Apr-201421-Apr-2014
      4321/MH-01-CB-112322-May-2014