DECLARE @doc VARCHAR(256)
DECLARE @doctemp VARCHAR(256)
SET @doc='467 . 1 2 3 4 .5 6 7 8 9 0 6hhjjjj'
SET @doc = replace(@doc,' ','')
SET @doctemp = substring(@doc,charindex('.',@doc)+1,len(@doc))
SET @doctemp = substring(@doctemp,charindex('.',@doctemp),len(@doctemp))
SET @doc = substring(@doc,1,patindex('%'+@doctemp+'%',@doc)-1)
SELECT CASE
WHEN @doc LIKE '[0-9.]%'
THEN CAST(SUBSTRING(@doc, 1, PATINDEX('%[^0-9.]%', @doc+' ') - 1) AS FLOAT)
ELSE 0
END