I have a table which has the following columns and values
ID TYPE NAME
1 MAJOR RAM
2 MAJOR SHYAM
3 MAJOR BHOLE
4
I agree with billinkc. In a sequential mind, like mine, it can occur different. The approach is to use a cursor and insert the records into a temp table. This table can have a column, INT type, lets say it is called "POSITION" which increments with every insert. Check for ID changes, and add the empty row everytime it does. Finally make the SELECT order by "POSITION".
My context was: An interface that dinamically adjust to what the user needs, one of the screens shows a payment table, grouped by provider with the approach early mentioned. I decided to manage this from database and skip maintainance for the screen at client side because every provider has different payment terms.
Hope this helps, and lets keep an open mind, avoid saying "don't do this" or "this is not what SQL was designed for"