SQL Eval Function String_Trim
String_Trim removes all leading and trailing white-space characters from the
String_Trim ( @source NVARCHAR (MAX) ) RETURNS NVARCHAR (MAX)
- source: The source string.
- The string that remains after all white-space characters are removed from the start and end of the
- If no characters can be trimmed from the
sourceinstance, the method returns it without any changes.
SELECT SQLNET::String_Trim(' John Doe ')
It is equivalent to
String_Trim except no NVARCHAR(MAX) parameters; it can be used when input data will never be over 4000 characters as this function offers better performance.
String_Trim4k ( @source NVARCHAR (4000) ) RETURNS NVARCHAR (4000)
SELECT SQLNET::String_Trim4k(' John Doe ')