Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update empty value when preceding row is not empty
Message
 
 
To
03/02/2016 08:29:27
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01630642
Message ID:
01630673
Views:
36
>I've imported a table and some of the rows have blank values
>
>I want to update the empty values of CaseID with the preceding value so in this example all the NULL CaseID will be 122303.
>I don't mind about the other columns its just the CaseID I want
>
>
>INC CaseID Status
>N 122303 Open: Investigation
>NULL NULL NULL
>NULL NULL NULL
>NULL NULL NULL
>N 122331 Open: Investigation
>
>
>Any suggestions on some SQL to do that ?
>
>Thanks
>
>Nick

See solution by Itzik Ben-Gan

http://sqlmag.com/t-sql/last-non-null-puzzle
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform