If I have codes stored in sql server database that look something like the following.
000001234560
000012345670
000000123450
How Can i remove all leading zeroes from the start of each code leaving me with
1234560
12345670
123450
Thank you
If I have codes stored in sql server database that look something like the following.
000001234560
000012345670
000000123450
How Can i remove all leading zeroes from the start of each code leaving me with
1234560
12345670
123450
Thank you
Found the answer through another stackoverflow query here
The code that worked for me was
SUBSTRING(str_col, PATINDEX('%[^0]%', str_col+'.'), LEN(str_col))
Thanks for your help