i have this function so thet i could easily get name of countries in english or in german
CREATE FUNCTION vNationality ( @lang VARCHAR(3) )
RETURNS @vNationality TABLE
(
PK INT,
FKArea INT,
Country CHAR(30)
)
AS
BEGIN
IF @lang = 'ENG'
INSERT @vNationality
SELECT PK, FKArea, RTRIM(CountryENG) AS Country
FROM Nationality
IF @lang = 'GER'
INSERT @vNationality
SELECT PK, FKArea, RTRIM(CountryGER) AS Country
FROM Nationality
RETURN
END
GO
but Country field is not trimmed.
Does enyone have a solution?