• You are missing column RowNo in your table Heap.

    Files keep the data in physical order as they've been added to the file (because that's a definition of "file").

    tables in relational databases do not have such a "natural" order of records.

    You need to specify it and upload it from the file together with data.

    _____________
    Code for TallyGenerator