Skip to content
Advertisement

Select rows after the current row which are null and combine them to rows

I have written the following SQL code to display the data as rows, where the row after data is having null values except on the description column.

This results in the output as follows:

enter image description here

I have written the following query to group and display rows:

The data is displayed as follows

enter image description here

Expected output is as follows

Advertisement

Answer

Except the fact that the table design is pretty awful, I would suggest the following approach:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement