1
Good afternoon.
I have a varchar with some numbers
set @ID_CUSTOMERNUMBER = '01234567'
I would remove the zero only if it is the first number of my variable, example:
'0123456789' removing the zero would stay '123456789'
'123401234' can not remove the zero it is not the first.
I have the command
PATINDEX('%0%', @ID_CUSTOMERNUMBER);
but it always returns the index, regardless of whether it is the first or not.
One option is to convert to int and then back to scan. Up to how many digits the number can have?
– José Diz