I need to fill in the nulls in the batch field the value from the
record immediately preceding the null one ie replace the nulls with
the preceding value until I hit a record with a value in it--then hold
the next value through the next set of nulls, and so on.

See example below:
I wanna copy down batch "IMR138" in record ID 1, all the way to ID 10.
Then copy down batch "7138" all the way to ID 20 and so on....

Note: This data is imported from a fixed width text file so i dont
know if it would be easier to write code that would read the text file
 line by line and then updating the nulls in the process?

ID      BATCH
1       IMR138
2
3
4
5
6
7
8
9
10
11      7138
12
13
14
15
16
17
18
19
20
21      7141
22
23
24
25
26
27
28
29
30
31      04A49DS2007R
32


Reply via email to