Can somebody please tell me, what's wrong with the following construction?:
CASE @CountryID
WHEN 1 THEN SET @String = REPLACE(@String,'+420','')
WHEN 2 THEN SET @String = REPLACE(@String,'+421','')
WHEN 3 THEN SET @String = REPLACE(@String,'+359','')
WHEN 4 THEN SET @String = REPLACE(@String,'+7','')
WHEN 5 THEN SET @String = REPLACE(@String,'+48','')
WHEN 7 THEN SET @String = REPLACE(@String,'+63','')
END
@CountryID
is INT
.
The problem is appereantly in the CASE statement construction, as IF statement works well, but I can't see anything worng and tried different types of case construction and searched for documentation.
Any hints would be appreciate.