1 Reply Latest reply: Mar 23, 2015 1:12 PM by Sunny Talwar RSS

    Autonumber() in Incremental Loads

      We are trying to use autonumber() with incremental loads. On the initial load, we have the field with the autonumber() working fine.



      However, we want to keep the autonumber() continuing on subsequent incremental loads from where it last left off; so it would start the next with 5. Is this possible with the autonumber() function?

        • Re: Autonumber() in Incremental Loads
          Sunny Talwar

          Are you doing a autonumber on Field1? If yes then you can try the following:


          I have not tried it, but what if you create a variable, lets say vCount



          LOAD Count(AutoNumber) as AutoNumberCount

          Resident yourTable;


          LET vCount = Peek('AutoNumberCount')


          and then in your incremental load do AutoNumber(Field1) +$(vCount) as AutoNumber, but do this on a resident load table with a where condition specifying Where not Exists(Field1).


          Again, I have not tested this, but I feel a variation of this should work for you.