AnsweredAssumed Answered

Update Cursor

Question asked by jschwartz@fcgov.com_fcgov on Jun 21, 2018
Latest reply on Jun 22, 2018 by hua17

I'd like to use a cursor to iterate through a bunch of rows. If a valid value (not blank, not null) is encountered, skip the row and move on to the next row.

 

If a blank or null is encountered, then insert the value found in the row directly above.

 

Here at the top of the table the cursor will identify valid values and will skip and updates, but immediately in row 2, it'll identify nulls and will update the row with the values above, in this case (T10144, 480 and 150 respectively).

Further down in the table the cursor will identify that the value in the row it is not blank and not null. It'll skip the update on this row, but immediately on the next row it'll update using the values above.

Outcomes