In SQL no any TRIM function, it content LTRIM and RTRIM. so i created user function it called TRIM(<string>) for us for get trim string.
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO
CREATE FUNCTION [dbo].[TRIM](@string VARCHAR(MAX))RETURNS VARCHAR(MAX)BEGIN
RETURN LTRIM(RTRIM(@string))END
CREATE FUNCTION [dbo].[TRIM](@string VARCHAR(MAX))RETURNS VARCHAR(MAX)BEGIN
RETURN LTRIM(RTRIM(@string))END
No comments:
Post a Comment