Need to add a script to my query that replaces ‘0’ values with the previous non-zero values

I need a query that replaces the zero values on the COND, Temp and TOC columns with the previous non-zero value. For example:

COND Column (Current): 1 12 3 0 0 5 6 7 0 0 0

COND Column (Expected): 1 12 3 3 3 5 6 7 7 7 7

Any help will be appreciated! Thanks in advance

Current query and results