Dear all,
I have observations entries that look like this:

I'd like to remove the leading "0"s from the school codes. I can't simply destring it because that are alphabets.
I tried:
but it removes 0 from "50018" also, so I ended up with "5018".
Any help is very much appreciated!
Best,
Peter
I have observations entries that look like this:
I'd like to remove the leading "0"s from the school codes. I can't simply destring it because that are alphabets.
I tried:
Code:
gen high_school_code1 = subinstr(high_school_code, "0", "", 1)
Any help is very much appreciated!
Best,
Peter
Comment