Reputation: 700
SELECT LOWER(LTRIM(RTRIM(' 価格 '))) AS TrimmedString;
It gives ?? as output.
How to put it here in function:
Create OR ALTER Function dbo.udf_GetTrimAndLower (@input NVARCHAR(max))
Returns NVARCHAR(max)
AS
BEGIN
DECLARE @output NVARCHAR(max);
select @output = LOWER(LTRIM(RTRIM(@input)));
RETURN (@output);
END
Upvotes: 0
Views: 227
Reputation: 640
Try using this. I've added extra spaces for display purpose. You have to use the nvarchar data type.
SELECT LTRIM(RTRIM(N' 価格 ')) AS TrimmedString;
Upvotes: 1