Hi
I have a table with data in the following format
Col1 COL2
A 2001
B
C
D
E
F 2002
G
H
I 2003
I want a query that would fill the gaps with the last non-null value in col2
desired output
Col1 COL2 output_col
A 2001 2001
B 2001
C 2001
D 2001
E 2001
F 2002 2002
G 2002
H 2002
I 2003 2003
as you can see the output_column shows the last non-null value of the col2 for each row..if for any row it finds a new col2 value then it shows that value for that row and for next rows until it finds another new one and so on
how to achive that from sql query...??
regards,