/*********************************************************************************************************************
Purpose : Trim the given input string
Returns : Trimed string
Arguments : select * from fnTableSplitString('ab~cde~~efgh~','~')
=====================================================================================================================
Created By : Suresh Kumar N
Created On : 29-Mar-2011
----------------------------------------------------------------------------------------------------------------------
Modification Log
----------------------------------------------------------------------------------------------------------------------
Modified By Modified Date Reason
----------------------------------------------------------------------------------------------------------------------
************************************************************************************************************************/
CREATE FUNCTION [dbo].[fnTrim](@InputString nvarchar(max))RETURNS VARCHAR(MAX)AS
BEGIN
DECLARE @Output AS VARCHAR(MAX)SELECT @Output = LTRIM(RTRIM(@InputString))RETURN @OutputENDGO

Comments (0)