I've got a PIVOT table output in SQL Server Management Studio. Every row contains data that are either filled or NULL. I need to fill the NULL values according to the following logic:
- If value is NULL, then go further to the left (in the row) and fill it with the closest value to the left.
- If there are no values to the left, then use the closest value to the right to fill it.
Thanks for your kind help, Dave