I need that in a query that by default brings me an integer, at the end I put a special character that in his case is the % , I had tried to execute this query with the Replace statement , but when trying to structure it it threw me an error.
This is a query from my Example:
DECLARE @Var NVARCHAR(MAX)
SET @Var = 70;
Replace(@var,'@var',@var%);
My sentence at the moment does not bring me any result, but when trying also with Substring I only managed to eliminate the last digit of the result.
How can I make it possible to add the % sign at the end?
SELECT concat(integerField, "%") FROM exampleTable;
With this query you can convert the integer digit to a string and then concatenate the '%' character at the end of it: