﻿/***************************************
* FUNCTION f_trim
*
* trim completo: LTRIM(RTRIM(...))
*
* Steamware, S.E.L.
* mod: 2013.05.10
*
****************************************/
create FUNCTION [dbo].[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