according to this post: [https://dba.stackexchange.com/questions/118057/convert-string-numeric-values-with-comma-as-decimal-separator-to-numeric10-2][1]
... the following code should work:
declare @number_numeric numeric(26, 6),
@number_str varchar(30)
select @number_str = '1234,12'
select @number_numeric = convert(numeric(26, 6), replace(@number_str, ',', '.'))
print 'TEST: @number_numeric = %1!', @number_numeric
go
However, this line:
select @number_numeric = convert(numeric(26, 6), replace(@number_str, ',', '.'))
throws a syntax error:
Incorrect syntax near the keyword 'replace'.
For the life of me I can't figure out what is supposed to be the problem.
Does anybody else see it?