3 Replies Latest reply on Mar 25, 2021 3:20 PM by Arya Nymeria

    Please help scenario

    Arya Nymeria Active Member

      I have a requirement to identify the records in history table that doesn't exist in stage table. The caveat is that I need to use the file date from the stage table to use as deactivation date and update history table. For example STAGE has cols name, number and date as abc, 123, 01/01/2021 and history has xyz, 234, 12/31/2999. Since xyz,234 doesn't exist in stage, this record needs to be terminated in history table with 01/01/2021. sample output will be xyz, 234, 01/01/2021. Can anyone help how to create a mapping or a sample sql query?

       

        

      STAGEHISTORY
      NAMENUMBERFILE_DTNAMENUMBEREND_DT
      ABC1231/1/2021XYZ23412/31/2999

       

       

      OUTPUT

       

      HISTORY
      NAMENUMBEREND_DT
      123ABC01/01/2021
        This content has been marked as final.  Show 3 replies