Need help for SQL Cursor : I have below table 
[![Main Table][1]][1]


i want below output
[![Required Output][2]][2]


I am using this code

    
    declare
    @InvoiceNo Varchar(100)
    
    SET @InvoiceNo = '17-18/1003'
    DECLARE @srNO Varchar(100)
    print @InvoiceNo
    BEGIN
    
    CREATE TABLE #tempTableNew (SrNO Varchar(100),Description Varchar(100),Qnty Varchar(100),Unit Varchar(100),Rate Varchar(100),Amount Varchar(100))
    
    DECLARE CREATFINALTABLE CURSOR FOR
    Select 
    ROW_NUMBER() OVER(ORDER BY B.InvoiceNo ASC) AS 'SrNo'
    
    from Billing B
    INNER JOIN Furniture F on F.FurnitureID=B.ProductID
    where B.InvoiceNo=@InvoiceNo  
    
    OPEN CREATFINALTABLE   
    FETCH NEXT FROM CREATFINALTABLE INTO @srNO
    
    WHILE @@FETCH_STATUS = 0   
    BEGIN   
    Select 
    CONVERT(varchar,@srNO) AS 'SrNo',
    F.FurnitureName as 'Description',
    CONVERT(varchar,B.Quantity) as 'Qnty',
    CONVERT(varchar,U.UnitName) as 'Unit',
    CONVERT(varchar,B.Rate)as 'Rate',
    CONVERT(varchar,B.Amount)as 'Amount' 
    INTO #tempTable
    from Billing B
    INNER JOIN Furniture F on F.FurnitureID=B.ProductID
    INNER JOIN UnitMaster U ON U.UnitID=B.UnitID
    where B.BillingID=@srNO
    
       Insert INTO #tempTableNew
          Select *   From #tempTable
       Where SrNo = @srNO
       Union ALL
       Select (@srNO)as 'srNo', ('SIZE: '+CONVERT(varchar,Length) +' X'+CONVERT(varchar,Breadth) + ' X'+CONVERT(varchar, Height)) as '[Description]',' 'as 'Qnty',' ' as 'Unit',' ' as 'Rate', ' ' as 'Amount' From Billing
       Where BillingID = @srNO
        Union ALL
       Select (@srNO)as 'srNo','SPECS:' as '[Description]',' 'as 'Qnty',' ' as 'Unit',' ' as 'Rate', ' ' as 'Amount' From #tempTable
       Where SrNo = @srNO
     
    
           FETCH NEXT FROM CREATFINALTABLE INTO @srNO 
       
        DROP TABLE #tempTable
      
           
    END   
    
    
    select * into #formated from #tempTableNew
     select * from #formated
    
      DROP TABLE #tempTableNew
      DROP Table #formated
    
    CLOSE CREATFINALTABLE   
    DEALLOCATE CREATFINALTABLE
    end

and I am getting this output. Plz Help me to get required output. I want to display records based on group by AreaOfUsage. help me to modify this cursor so that i can get my required output. thank u in advance..
[![Current Output][3]][3]


  [1]: https://i.stack.imgur.com/Mlllp.png
  [2]: https://i.stack.imgur.com/lkJHA.png
  [3]: https://i.stack.imgur.com/9ux8d.png
