3 Replies Latest reply: Feb 11, 2013 5:38 AM by Bastien Rogowski RSS

    Assigning existing values to new fields in load script

    V Butler

      Hi,

       

      I have a collection of "parent" issuers which have been mapped to data that is stored in a separate QVD (the data is keyed on the ISSUERID field). I also have a collection of "child" issuers which are related to the "parent" issuers by sharing an AGENTID value between the two of them - i.e., one pair of "parent" and "child" issuers will share the same AGENTID. The ISSUERID field for the "child" issuers are not stored in the QVD from which I am retrieving the data for the "parent" issuer - so a Left Join on the separate QVD returns the assigned data for the "parent" ISSUERID and nothing for the "child" ISSUERID:

      AGENTID

      ISSUERID

      MGMNTLNID

      MGMNTLNDESC

      BUSGRPID_1

      BUSGRPDESC_1

      BUSGRPID_2

      BUSGRPDESC_2

      555

      1234567

      1

      Business

      101

      Retail

      1010

      Fashion Retail

      555

      1234568

      -

      -

      -

      -

      -

      -

       

      I need to find a way to give the "child" issuer the values that have been assigned to the corresponding "parent" issuer (i.e., the "parent" issuer with the same AGENTID value as the "child" issuer). So, an Oracle equivalent might be:

      INSERT INTO [table] (SELECT MGMNTLNID,MGMNTLNDESC,BUSGRPID_1,BUSGRPDESC_1,BUSGRPID_2,BUSGRPDESC_2) FROM [source] WHERE [AGENTID values match]

       

      So, I need to copy the assigned values, not move them away from the "parent" issuer. How can this be achieved within the load script?

       

      Also, I need to be able to display the assigned values for both the "parent" and "child" issuers in the UI.

       

      Many thanks,

       

      VB