I have a database where there are two tables: T1, T2
My goal is to "overlay" rows from T2 on top of the T1 row with a matching index, so that any non-null values in T2 rows will supersede those from the T1 row.
Example:
[pre]
Table T2
+------------------------
| id t1_id color ready
+------------------------
| 80 1 red <null>
| 81 2 <null> yes
+------------------------
Table T1
+-----------------------
| id color ready
+-----------------------
| 1 blue no
| 2 blue yes
+-----------------------
Overlay:
+------------------------
| id t1_id color ready
+------------------------
| 80 1 red no
| 81 2 blue yes
+------------------------
[/pre]
Any suggestions for how to display the output ("Overlay") in DaDaBIK?
Is there another paradigm in MySQL ( using InnoDB ) that might better serve what I am trying to do?
Notes:
Each "t1_id" may appear multiple times in T2 but only one row will be selected at a time.
Each "id" can only occur once in T1.
My goal is to "overlay" rows from T2 on top of the T1 row with a matching index, so that any non-null values in T2 rows will supersede those from the T1 row.
Example:
[pre]
Table T2
+------------------------
| id t1_id color ready
+------------------------
| 80 1 red <null>
| 81 2 <null> yes
+------------------------
Table T1
+-----------------------
| id color ready
+-----------------------
| 1 blue no
| 2 blue yes
+-----------------------
Overlay:
+------------------------
| id t1_id color ready
+------------------------
| 80 1 red no
| 81 2 blue yes
+------------------------
[/pre]
Any suggestions for how to display the output ("Overlay") in DaDaBIK?
Is there another paradigm in MySQL ( using InnoDB ) that might better serve what I am trying to do?
Notes:
Each "t1_id" may appear multiple times in T2 but only one row will be selected at a time.
Each "id" can only occur once in T1.