私は解決策を見つけました:
DECLARE @s1 VARCHAR(max)
DECLARE @length INT
DECLARE @current INT
SET @s1 = '#12 + #13 - #14 * 3'
SET @length = Len(@s1)
SET @current = 0
DECLARE @returned_value VARCHAR(max)
WHILE ( @current < @length )
BEGIN
SET @current = Charindex('#', @s1, @current)
SET @s1 = Stuff(@s1, Charindex('#', @s1, @current) , 1, 'func1(''')
SET @s1 = Stuff(@s1, Charindex(' ', @s1, @current) , 1, ''') ')
SET @length = Len(@s1)
SET @current = Charindex('#', @s1, @current)
IF @current = 0
BEGIN
SET @current = @length
END
END
SELECT @s1