Suppose I have the following table:
| ID | col1_fix | col2 | col3 | ref_ID
1 val1 val12 val13
2 val2 val22 val23 1
3 val3 val32 val33
What statement should I use to output to: (row id=2 has ref_id = 1 so instead of getting its value, it will get value from row id=1 instead, but I want to keep col1_fix value from row id=2, so this row will only end up getting col2 and col3 value from row id = 1)
| ID | col1_fix | col2 | col3 |
1 val1 val12 val13
2 val2 val12 val13
3 val3 val32 val33
I'm thinking about creating a view so it will join its own table not not sure if its the right direction).