Skip to Main Content

Populate 'Null' values with previous known 'not null' value

ArunselvanJun 9 2014 — edited Jun 9 2014

Hi All,

I have the following requirement to populate the missing values (null values) with the available previous known 'Not null' values.

Example Source:

Emp_IdStart_DtLOCCommGrade

A101

1/1/2013

NJ4000B

A101

3/15/2013

CA4800

A101

5/15/2013

3500C

A101

7/25/2013

2500

A101

12/20/2013

NY5800A

A101

2/14/2013

5000

A101

5/20/2014

DC6000A

A101

6/3/2014

3600C

A102

5/24/2013

LA5000A

A102

12/15/20134300

Expected output values in LOC and Grade columns:

Emp_IdStart_DtLOCCommGrade
A101

1/1/2013

NJ4000B
A101

3/15/2013

CA4800B
A101

5/15/2013

CA3500C
A101

7/25/2013

CA2500C
A101

12/20/2013

NY5800A
A101

2/14/2013

NY5000A
A101

5/20/2014

DC6000A
A101

6/3/2014

DC3600C
A102

5/24/2013

LA5000A
A102

12/15/2013

LA4300A

Any suggestion would be helpful.

Regards,

Arun

This post has been answered by Martin Preiss on Jun 9 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Jul 7 2014
Added on Jun 9 2014
5 comments
2,152 views