Farhan Shariff

Farhan Shariff

  • NA
  • 1.1k
  • 110.8k

Copy from table to another based on Row and column

Mar 10 2014 8:22 AM

<blockquote class="FQ"><div class="FQA">Quote:</div>Copying from one table to another
I have 2 datatable table1 and table2
I want match the Parameter names and copy the 5th and 2nd value from table2 to table1 into a new column(p90 and p10) for same parameter Name how to approach the problem ?


Input
table1
  |Parameter Name| Lower limit      |Upper limit    |P90 point |P10 point |
     Diff_IC[1]        |  1.5              |    2.5          |             |             |
     Prog_IC[2]       |-10               |  10000000    |             |             |
     Nam_IC[3]       |-64               |64                |             |             |      
     ADCI_N[1 ]      |-0.8              | -0.1             |             |             |




table2
    Diff_IC[1]  |   Prog_IC[2]     |       Nam_IC[3]      | ADCI_N[1 ] |
  -0.145712003      -0.146583006         -0.165715003      -0.126583006
 -0.137499005      -0.137592003          -0.157493005      -0.117592003
 -0.142690003      -0.143250003          -0.132693003      -0.153250003
 -0.139434993      -0.140459001          -0.129434933      -0.150459001
 -0.147183999      -0.148519993          -0.117183459      -0.138519993
 -0.137183999      -0.134519993          -0.517183459      -0.338519993
                                                 


 Output:
 table1
|Parameter Name| Lower limit| Upper limit      |P90 point       |P10 point           |
  Diff_IC[1]        |  1.5       |    2.5           |-0.147183999    |-0.137499005        |
  Prog_IC[2]      |-10         |  10000000        | -0.148519993   |  -0.137592003      |
  Nam_IC[3]       |-64         |64                | -0.117183459   |  -0.157493005      |
  ADCI_N[1 ]      |-0.8        | -0.1             |  -0.138519993  |   -0.117592003     |


</blockquote>


Answers (1)