Good afternoon.
I have a varchar with some numbers
set @ID_CUSTOMERNUMBER = '01234567'
I would like to remove the zero only if it is the first number of my variable, eg
'0123456789' removing the zero would be '123456789'
'123401234' I can not remove zero, it is not the first one.
I have the command
PATINDEX('%0%', @ID_CUSTOMERNUMBER);
but it always returns the index, regardless of whether it is first or not.