0
I intend to replace a null value by the last value before that null or nulls.
using LAG in cases where I have 2 nulls or more only makes the replace in the first null.
COL1 is the key, COL2 is the original value and COL3 is the expected result.
(in the explanation in the "-" column, Else is all col2)
RESOLVED
through this question: https://stackoverflow.com/questions/26977267/fill-null-values-with-last-non-null-amount-oracle-sql
example in the image
Pedro, use the part below His Response and put what was necessary to solve this problem. This way the question will be answered. On this site, this marking is not used SOLVED. See more details on tour.
– Ismael
"Your Answer" or "Answer Your Question"?
– user26858
That’s right, when it’s for yourself it looks different, had forgotten.
– Ismael