Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
In my current script I have a field that contains data with a leading alpha character followed by six digit number. I have been tasked to create a new ID by using the leading alpha character and then generating a sequential set of ID numbers.. For example I have the numbers D123456, D123457, D123458 and so on. I want to isolate all the ID numbers with a D and recreate an ID number keeping the leading alpha character. Basically, I would like to use AutoNumber or AutoID to create a whole new number with the leading letter. The same would apply for the other ID numbers in this field. ex. C123456, C123457, C123459, N123456, N123457. I would like to repeat this for every type of ID number. Would appreciate if anyone could provide some insight on how I could possibly generate these ID's. Thank you in advance.
Maybe like
LOAD ID, Left(ID,1) & Autonumber(ID, Left(ID,1)) as newID
INLINE [
ID
D123456
D123457
D123458
C123456
C123457
C123459
N123456
N123457
];
You may need to sort your input table if you need your newID appropriately increasing with old ID number value.
Maybe like
LOAD ID, Left(ID,1) & Autonumber(ID, Left(ID,1)) as newID
INLINE [
ID
D123456
D123457
D123458
C123456
C123457
C123459
N123456
N123457
];
You may need to sort your input table if you need your newID appropriately increasing with old ID number value.