How can I add column to a table based on data values in other table ?
2 views (last 30 days)
Show older comments
Consider the following table schemas: T1 = {'A' 'B' 'C' 'D' 'E'}; T2 = {'G' 'B' 'C' 'D'};
Given that {'B' 'C' 'D'} is the composite primary key for both T1 and T2, I want to add column 'E' to T2 from T1, that is for all records(rows) where (T1.A == T2.A AND T1.B == T2.B AND T1.C == T2.C), E_T2 = T1.E;
E_T2 will be finally added as a variable to T2.
Please help me find a solution to this.
Thanks!
1 Comment
Peter Perkins
on 25 Apr 2017
Siddhartha, I think you need to give a short, clear specific example of what you want to do.
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!