Hi,
I have a table that looks like the following:
id, Name, LinkBackId, Param1, Param2, Param3
1, "Name1", NULL, 10, 20, 30
2, "Name2", NULL, 10, 20, 30
3, "Name3", 2, 14, NULL, NULL
The LinkBackId is important here because this is associated with the id that is also in this table. Looking at row 3 LinkBackId contains 2 I want it to return the row from id = 0 and merge the values from row 3 into the result like this:
3, "Name3", 2, 10, 20, 30
I am treating the rows that contain NULL in the LinkBackId as a "master" row of parameters. The rows that contain a linkbackid are to be overriden by the master values that are not NULL.
I am wondering if there is an elegant method to do this instead of using lots of if statements.
Hope this makes sense.
Thank you