1
が含まれている私はSQLを選択し、小数点日
現在のテーブル出力指定した文字列から数字のみ小数点他の整数値をしたい:
Column
10.40 (10/14 after @ 10.3)
10.1%
10%
10/12/2017 10.45
8.2 10/12
15.20% 10/12/17
11/12
> 10.50
< 50.10
予想される出力:
10.40
10.1
10
10.45
8.2
15.20
NULL
NULL
NULL
がクエリを試してみました:
declare @strAlphaNumeric VARCHAR(max) ='completed 11/12 at Dr Lemons office'
select
stuff(stuff(@strAlphaNumeric+'x',patindex('%[0-9][^0-9.]%', @strAlphaNumeric+'x') + 1, len(@strAlphaNumeric), ''), 1, patindex('%[0-9]%', @strAlphaNumeric) - 1,
'')
誰も助けることができますか?
SQLはこんなもののための最高のツールではありません。 – HoneyBadger