Hello I have a data here that contains 10 characters and 8 characters. Some values has 10 characters and I want to remove the first two digits without touching the other 8 characters.
ID Code | Expected Output (New ID code) |
5151550002 | 51550002 |
5151552000 | 51552000 |
30300302 | 30300302 |
11018031 | 11018031 |
7062700503 | 62700503 |
Basically, I just want to remove the first two characters. Can you help me with this one please?
Try this:
IF LEFT(ToString([ID Code]),2) IN ("51","70")
THEN RIGHT(ToString([ID Code],8)
ELSE ToString([ID Code])
ENDIF
Alternatively, you can just use
RIGHT(ToString([ID Code],8)
Alternatively, Alternatively, if you already have a string type column:
RIGHT([ID Code], 8)