This topic has not yet been rated - Rate this topic

LTRIM and RTRIM Trimming Functions (Level 2)

LTRIM and RTRIM Trimming Functions (Level 2)
SQL Server 6.x SQL Server 2000
The LTRIM and RTRIM functions returned NULL in queries using zero-length strings:
SELECT RTRIM('')

SELECT DATALENGTH(RTRIM(''))
Zero-length strings are supported. The queries shown return nonnull values; the first returns '' and the second returns 0.

Expect different results as compared to earlier versions of SQL Server. LTRIM and RTRIM provide different output from earlier versions of SQL Server.


Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.