Declare @MyStr char(20)
Set @MyStr = '00004567890'
Select Convert(bigint,SubString(@MyStr, PatIndex('%[^0]%',@MyStr),Len(@MyStr) + 1 - PatIndex('%[^0]%',@MyStr)))
What this does is to find the first non-zero character in the field and then substring from there. ...