Selecting a latest NON Null value
I have an issue with writing a select statement for the following scenario. Any help is really appreciated.
I have multiple modifications made to a record in a table. All the mods are inserted as new rows. If user wants modify a value in a column, only that column value is inserted. Rest of the columns would be left NULL, not copied from the previous row.
First a row is added to the table. Say it has thre fact columns (C1, C2, C3). If user wants to make changes to C2 column, user inserts a row into that table just with a value in C2 column, the orther two columns of the row will be NULL. Another mod to C1 column would be another insert into the table with other two columns as NULL. I would like to select the latest of each fact column in a SELECT statement. Is it possible or should I go for a pl/sql procedure?