I'm faced with following problem, I'm not sure how to tackle it. I have a rough idea, but I'm not sure how I would execute it.
Here is the issue
Table A exist in the following format:
Name | Name_Att| Name2 | Name_Att2
--------+---------+-------+-------
ryan | red | xyz | green
Likewise Table B exist in this format:
Name | Name_id |
--------+---------+
ryan | 123 |
xyz | 129 |
Likewise Table C exist in this format:
Name_Att| C_id | Name_id
--------+---------+---------
red | 4591 | 123
green | 4592 | 123
blue | 4593 | 123
green | 4594 | 129
blue | 4595 | 129
So I'm trying to create the following table:
Name_id | C_id |Name_id2 | C_id2
--------+---------+---------+----------
123 | 4591 | 129 | 4594
Is there any way I should go about this? I was thinking about writing code to do this. I'm sure there is SQL way to accomplish this. However I'm not sure.
