I have two tables.
<table style="border-collapse: collapse; width: 108pt;" width="144" border="0" cellpadding="0" cellspacing="0"><col style="width: 35pt;" width="47"> <col style="width: 40pt;" width="53"> <col style="width: 33pt;" width="44"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 35pt;" width="47" height="20">ID</td> <td class="xl65" style="width: 40pt;" width="53">Subject</td> <td class="xl65" style="width: 33pt;" width="44">Marks</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">aaa</td> <td class="xl65">34</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">bbb</td> <td class="xl65">78</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">2</td> <td class="xl65">aaa</td> <td class="xl65">74</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">3</td> <td class="xl65">bbb</td> <td class="xl65">76</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ccc</td> <td class="xl65">54</td> </tr> </tbody></table>
<table style="border-collapse: collapse; width: 144pt;" width="192" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="3"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 48pt;" width="64" height="20">ID</td> <td class="xl65" style="width: 48pt;" width="64">Subject</td> <td class="xl65" style="width: 48pt;" width="64">Name</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">aaa</td> <td class="xl65">AAA</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">bbb</td> <td class="xl65">AAA</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">3</td> <td class="xl65">bbb</td> <td class="xl65">CCC</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ccc</td> <td class="xl65">DDD</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ddd</td> <td class="xl65">EEE</td> </tr> </tbody></table>
The output should be
<table style="border-collapse: collapse; width: 192pt;" width="256" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="4"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 48pt;" width="64" height="20">ID</td> <td class="xl65" style="width: 48pt;" width="64">Subject</td> <td class="xl65" style="width: 48pt;" width="64">Name</td> <td class="xl65" style="width: 48pt;" width="64">Marks</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">aaa</td> <td class="xl65">AAA</td> <td class="xl65">34</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">bbb</td> <td class="xl65">AAA</td> <td class="xl65">78</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">3</td> <td class="xl65">bbb</td> <td class="xl65">CCC</td> <td class="xl65">76</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ccc</td> <td class="xl65">DDD</td> <td class="xl65">54</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ddd</td> <td class="xl65">EEE</td> <td class="xl65">
</td> </tr> </tbody></table>
This is just a sample. Both the tables have many more fields. My requirement is to find the value from table1 given the two fields. Put them in the table2.
In Table2, I need to fill the Marks value using the table1.
For each row, with the help of two fields ID and subject, i need to lookup the Marks value in table1.
Any help is highly appreciated.
Thanks in advance,
Jaya
<table style="border-collapse: collapse; width: 108pt;" width="144" border="0" cellpadding="0" cellspacing="0"><col style="width: 35pt;" width="47"> <col style="width: 40pt;" width="53"> <col style="width: 33pt;" width="44"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 35pt;" width="47" height="20">ID</td> <td class="xl65" style="width: 40pt;" width="53">Subject</td> <td class="xl65" style="width: 33pt;" width="44">Marks</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">aaa</td> <td class="xl65">34</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">bbb</td> <td class="xl65">78</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">2</td> <td class="xl65">aaa</td> <td class="xl65">74</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">3</td> <td class="xl65">bbb</td> <td class="xl65">76</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ccc</td> <td class="xl65">54</td> </tr> </tbody></table>
<table style="border-collapse: collapse; width: 144pt;" width="192" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="3"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 48pt;" width="64" height="20">ID</td> <td class="xl65" style="width: 48pt;" width="64">Subject</td> <td class="xl65" style="width: 48pt;" width="64">Name</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">aaa</td> <td class="xl65">AAA</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">bbb</td> <td class="xl65">AAA</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">3</td> <td class="xl65">bbb</td> <td class="xl65">CCC</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ccc</td> <td class="xl65">DDD</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ddd</td> <td class="xl65">EEE</td> </tr> </tbody></table>
The output should be
<table style="border-collapse: collapse; width: 192pt;" width="256" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="4"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 48pt;" width="64" height="20">ID</td> <td class="xl65" style="width: 48pt;" width="64">Subject</td> <td class="xl65" style="width: 48pt;" width="64">Name</td> <td class="xl65" style="width: 48pt;" width="64">Marks</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">aaa</td> <td class="xl65">AAA</td> <td class="xl65">34</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">1</td> <td class="xl65">bbb</td> <td class="xl65">AAA</td> <td class="xl65">78</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">3</td> <td class="xl65">bbb</td> <td class="xl65">CCC</td> <td class="xl65">76</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ccc</td> <td class="xl65">DDD</td> <td class="xl65">54</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">4</td> <td class="xl65">ddd</td> <td class="xl65">EEE</td> <td class="xl65">
</td> </tr> </tbody></table>
This is just a sample. Both the tables have many more fields. My requirement is to find the value from table1 given the two fields. Put them in the table2.
In Table2, I need to fill the Marks value using the table1.
For each row, with the help of two fields ID and subject, i need to lookup the Marks value in table1.
Any help is highly appreciated.
Thanks in advance,
Jaya