UNABLE TO SORT DATA IN THE ORDER AS IT SHOULD BE BY USING LINE OPERATION



  • TWO LINES DATA WHICH MAKES ONE COMPLETE DATA,COMPRISING TEXT AND NO BOTH.```
    3787 05/10/2020 1100.00 BLOCK .00 1100.00
    MD BABUL 0000000 000
    900144 07/10/2020 2854.00 BLOCK 848315329 20201007 2815.00 39.00
    N Jain 00648053B 0000044 944
    3826 08/10/2020 2500.00 BLOCK .00 2500.00
    BAL KRISHNA KUMAR 0000000 000
    3827 08/10/2020 2500.00 BLOCK .00 2500.00
    BALKRISHNA KUMAR 0000000 000
    3828 08/10/2020 2500.00 BLOCK .00 2500.00
    NISHIKANT KUMAR 0000000 000
    3829 08/10/2020 2500.00 BLOCK .00 2500.00
    NISHIKANT KUMAR 0000000 000
    900146 09/10/2020 6217.00 SINGLE 848315364 20201009 6216.00 1.00
    Ravi Kanti 01161053B M015053B 000
    3881 12/10/2020 3606.00 SINGLE 848315431 20201012 3605.00 1.00
    SHAKIL AKHTER 0245353B 0000377 000
    3944 12/10/2020 5969.00 BLOCK 848315508 20201015 5942.00 27.00
    MD AZAD 0000000 000
    900148 12/10/2020 3492.00 SINGLE 848315433 20201012 3491.00 1.00
    A Kumar 0174853B 0000133 914
    3975 14/10/2020 17625.00 BLOCK 848315483 20201014 17624.00 1.00
    MD FIROZ ALAM 0000000 000
    3980 14/10/2020 30444.00 SINGLE .00 30444.00
    SUNIL KR DAFTRI 00454053B 9999999 000
    3602 15/10/2020 20000.00 BLOCK 848315738 20201028 19999.00 1.00
    PINTU KUMAR SAH 0000000 000
    3849 15/10/2020 13544.00 BLOCK 848315544 20201017 13514.00 30.
    MD HAFIZUDDIN 0000000 000
    3995 15/10/2020 13541.00 SINGLE .00 13541.00
    SANJEEV KUMAR 00364053B 0000197 000
    4054 17/10/2020 6300.00 SINGLE 848315562 20201017 6299.00 1.00
    MD RIZWAN 00118053B 9999999 000
    4055 17/10/2020 6300.00 SINGLE 848315561 20201017 6299.00 1.00
    AINUL HAQUE 00118053B 9999999 000
    4102 20/10/2020 271.00 SINGLE .00 271.00
    MD SAHID 0187953B 0000133 000
    4151 22/10/2020 5140.00 BLOCK .00 5140.00
    SAJEED ALAM 0000000 000
    3837 25/10/2020 21731.00 BLOCK 848315676 20201027 21730.00 1.00
    JITENDRA KUMAR MAH 0000000 000
    4206 27/10/2020 20040.00 SINGLE 848316325 20201116 19988.00 52.00
    KABIRUL ISLAM 0203253B 0000534 000
    4230 27/10/2020 4102.00 BLOCK 848315739 20201028 4101.00 1.00
    SHANKAR KUMAR KESH 0000000 000
    3789 28/10/2020 6890.00 BLOCK 848315718 20201028 6889.00 1.00
    GOLMA LAL HARIJAN 0000000 000
    4258 29/10/2020 52733.00 BLOCK 848315793 20201030 52722.00 11.00
    DABIR ALAM 0000000 000
    4268 29/10/2020 10000.00 BLOCK 856762867 20210328 9015.00 985.00
    KAMESHWAR SINGH 0000000 000
    4287 29/10/2020 280.00 SINGLE 848315779 20201029 275.00 5.00
    O P SINGH 0142053B 0000403 000

    HOW TO SORT PROPERLY



  • @saibal-mukherrjee said in UNABLE TO SORT DATA IN THE ORDER AS IT SHOULD BE BY USING LINE OPERATION:

    TWO LINES DATA WHICH MAKES ONE COMPLETE DATA

    No surprise that the built in line sort will not help you. It does the sort assuming each line is 1 datum or record.

    So the choices are:

    1. Alter the lines so the built in sort will help
    2. Wait until someone possibly writes a sort function using python script or some other supported program language, or you learn how to do it.

    Obviously option 1 is the better idea. With this it could be done in 2 ways.

    1. Add enough of the first line to the start of the second line and then sort. This will keep the lines together, hopefully.
    2. Combine the 2 lines together as one line. This would involve adding a special character in between so you know where the original break in lines was. So after combining, sorting, then break at the special character.

    Terry


Log in to reply