2 Replies Latest reply: Feb 4, 2015 4:19 AM by Christophe Brock RSS

    Join one ID in a table with different IDs

    Christophe Brock

      Hello,

       

      I have the following problem:

      In a table with web data, containing different type of IDs. Each of the rows has only one of these IDs. Example:

       

      WebData:

      IDType1IDType2IDType3Visits
      123456--1
      -ABCDEF-3
      --U7634JULM2
      -FEDGDE-1
      4564564--3

       

      I also have a Users table which contain a master UserID + the other IDs for that particular user. Example

       

      Users (the IDs in red match the IDs from the WebData table):

      MasterIDIDType1IDType2IDType3
      1A123456QSDFQSSDFU97994D
      2A345345ABCDEFHJG654HGH
      3A678678GFHFDGU7634JULM
      4A121321FEDGDEVBNVN4343
      5A4564564CVXCVXCSDF4645DF

       

      What I want to achieve is add the MasterID in the WebData. It would be easy (for me at least) to join it if there was only 1 webID which I would need to match with the MasterID, but I'm struggeling to get this done.

       

      So basically, I would need to end up with this:

      WebData:

      IDType1IDType2IDType3VisitsMasterID
      123456--11A
      -ABCDEF-32A
      --U7634JULM23A
      -FEDGDE-14A
      4564564--35A

       

      What would be the best approach to achieve this?

       

      Kind regards,

      Christophe