Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We are trying to use autonumber() with incremental loads. On the initial load, we have the field with the autonumber() working fine.
Autonumber | Field1 |
---|---|
1 | A |
2 | B |
3 | C |
4 | D |
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?
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
count:
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.
Best,
Sunny
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
count:
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.
Best,
Sunny