Hallo,
i have a table with three columns :
person_id FS value
----------- ----- ---------
50566 1 20
50566 2 40
50566 3 0
50566 4 0
50566 5 70
I want that when the 'value' is zero then it should be replaced with the 'value' directly previous to it in that column . So, in the example above , the 'value' in the 3rd and 4th rows should be replaced with 40 , how to do that in sql ?
Any help would be appreciated.
Thanks a lot in advance.
Alex
i have a table with three columns :
person_id FS value
----------- ----- ---------
50566 1 20
50566 2 40
50566 3 0
50566 4 0
50566 5 70
I want that when the 'value' is zero then it should be replaced with the 'value' directly previous to it in that column . So, in the example above , the 'value' in the 3rd and 4th rows should be replaced with 40 , how to do that in sql ?
Any help would be appreciated.
Thanks a lot in advance.
Alex