Update column based on previous valid value and on another column

Database
Highlighted
Enthusiast

Update column based on previous valid value and on another column

I have a table as below, when there is a null in CASE_IN then the BR_CD should be updated to the previous non null case_IN value. I have given the sample input and output. Please can someone help?

 

IDCASE_INBR_CDDate
1Y12341/2/12
1Y12341/2/12
1?101/3/12
1?201/4/12
1Y102/8/12
2Y56783/3/18
2Y?3/5/18
2Y87653/7/18

 

Expected output:

 

IDCASE_INBR_CDDate
1Y12341/2/12
1Y12341/2/12
1?12341/3/12
1?12341/4/12
1Y102/8/12
2Y56783/3/18
2Y56783/5/18
2Y87653/7/18
2 REPLIES
Enthusiast

Re: Update column based on previous valid value and on another column

Can someone pls help?

Junior Contributor

Re: Update column based on previous valid value and on another column

Why, it's a duplicate of the question you posted here