i was searching script to extract number from text in sql server and i found this
CREATE FUNCTION [dbo].[GetNumbersFromText](@String VARCHAR(2000)) RETURNS @
Here is an appropriate and working solution for this query
http://www.ittutorials.in/source/sql/sql-function-to-extract-only-numbers-from-string.aspx