Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
March 4, 1999
A. SQL has a reasonably full set of string manipulation tools - alldoc'd in the BOL. Some are detailed below.
RTRIM/LTRIM - for leading/trailing spaces
SUBSTR - standard substring
RIGHT
CHARINDEX/PATINDEX - find a particular char/pattern
STUFF - replace text at given offset(s)
REPLACE - SQL 7.0 only. Replaces chars anywhere in a column
You May Also Like