CREATE function dbo.udfGetNumVal
(
@strInput nvarchar(50)
)
Returns DECIMAL(18,0)
AS
BEGIN
DECLARE @iCtr INT
DECLARE @AscVal INT
DECLARE @NumVal NVARCHAR(100)
SET @iCtr = 1
SET @NumVal = ''
WHILE @iCtr <= Len(@strInput)
BEGIN
SET @AscVal = Ascii(substring(@strInput,@iCtr,1))
IF (@AscVal >= 48) and (@AscVal <= 57)
BEGIN
SET...