DECLARE @Desc VARCHAR(100) = 'The amount you currently owe is $1.00 The amount you do not owe is $2,000.00'
SELECT SUBSTRING(@Desc, PATINDEX('%$%', @Desc), ABS(CHARINDEX(N'.', @Desc, CHARINDEX(N'$', @Desc, 1)) - CHARINDEX(N'$', @Desc, 1)) + 3)
DECLARE @Desc VARCHAR(100) = 'The amount you currently owe is $10.00 The amount you do not owe is $2,000.00'
SELECT SUBSTRING(@Desc, PATINDEX('%$%', @Desc), ABS(CHARINDEX(N'.', @Desc, CHARINDEX(N'$', @Desc, 1)) - CHARINDEX(N'$', @Desc, 1)) + 3)
DECLARE @Desc VARCHAR(100) = 'The amount you currently owe is $100.00 The amount you do not owe is $2,000.00'
SELECT SUBSTRING(@Desc, PATINDEX('%$%', @Desc), ABS(CHARINDEX(N'.', @Desc, CHARINDEX(N'$', @Desc, 1)) - CHARINDEX(N'$', @Desc, 1)) + 3)
DECLARE @Desc VARCHAR(100) = 'The amount you currently owe is $1,000.00 The amount you do not owe is $2,000.00'
SELECT SUBSTRING(@Desc, PATINDEX('%$%', @Desc), ABS(CHARINDEX(N'.', @Desc, CHARINDEX(N'$', @Desc, 1)) - CHARINDEX(N'$', @Desc, 1)) + 3)
DECLARE @Desc VARCHAR(100) = 'The amount you currently owe is $10,000.00 The amount you do not owe is $2,000.00'
SELECT SUBSTRING(@Desc, PATINDEX('%$%', @Desc), ABS(CHARINDEX(N'.', @Desc, CHARINDEX(N'$', @Desc, 1)) - CHARINDEX(N'$', @Desc, 1)) + 3)
DECLARE @Desc VARCHAR(100) = 'The amount you currently owe is $100,000.00 The amount you do not owe is $2,000.00'
SELECT SUBSTRING(@Desc, PATINDEX('%$%', @Desc), ABS(CHARINDEX(N'.', @Desc, CHARINDEX(N'$', @Desc, 1)) - CHARINDEX(N'$', @Desc, 1)) + 3)
DECLARE @Desc VARCHAR(100) = 'The amount you currently owe is $1,000,000.00 The amount you do not owe is $2,000.00'
SELECT SUBSTRING(@Desc, PATINDEX('%$%', @Desc), ABS(CHARINDEX(N'.', @Desc, CHARINDEX(N'$', @Desc, 1)) - CHARINDEX(N'$', @Desc, 1)) + 3)
1条答案
按热度按时间yvgpqqbh1#
提供的信息很少,我猜这就是你可能看到的。