Files
GMW/GMW_DB/dbo/Functions/f_trim.sql
T

20 lines
427 B
SQL

/***************************************
* FUNCTION f_trim
*
* trim completo: LTRIM(RTRIM(...))
*
* Steamware, S.E.L.
* mod: 2013.05.10
*
****************************************/
create FUNCTION f_trim (@string NVARCHAR(MAX))
RETURNS NVARCHAR(MAX) AS
BEGIN
-- Prefix the required number of spaces to bulk up the string and then replace the spaces with the desired character
RETURN LTRIM(RTRIM(@string))
END