Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Null value column should take the value of the record which is above it.

$
0
0

Hi Friends,

I have below scenario

idNameLname
1abcabc1
2NULLabc1
3pqrpqr1
4NULLpqr1
5NULLpqr1

could you please provide a query to get values like below

idNameLname
1abcabc1
2abcabc1
3pqrpqr1
4pqrpqr1
5pqrpqr1

Which mean that, if the value is NULL then it should get the value of the record which is above it,

There can be more NULL values availabe consiquently.

Thanks in advance

parixit


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>