/ Published in: SQL

Today I need Trim() function in sql, but in Sql 2005 there is no function. Because of that I wrote this user (scalar) fuction.
It's very basic;
-First; it's Right Trim (RTrim()) string
- And then Left Trim (LTrim())
It's very basic;
-First; it's Right Trim (RTrim()) string
- And then Left Trim (LTrim())
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
CREATE FUNCTION dbo.Trim ( @string nvarchar(MAX) ) RETURNS nvarchar(MAX) AS BEGIN RETURN LTRIM(RTRIM(@string)) END
Comments
