Login     Register

        Contact Us     Search

XLeratorDB/strings Online Documentation

SQL Server STRIP function


STRIP

Updated: 30 April 2009


Use STRIP to remove punctuation from the beginning and end of a string.
Syntax
SELECT [wctString].[wct].[STRIP] (
   <@Text, nvarchar(max),>)
Arguments
@Text
is the text to be stripped. The @Text argument can be of data types that are implicitly convertible to nvarchar or ntext.
Return Types
nvarchar(max)
Remarks
·         STRIP removes punctuation remarks regardless of where they appear in the string.
·         Punctuation marks are:

DESCRIPTION
CODE
SYMBOL
EXCLAMATION MARK
33
!
QUOTATION MARK
34
"
NUMBER SIGN
35
#
DOLLAR SIGN
36
$
PERCENT SIGN
37
%
AMPERSAND
38
&
APOSTROPHE
39
'
LEFT PARENTHESIS
40
(
RIGHT PARENTHESIS
41
)
ASTERISK
42
*
PLUS SIGN
43
+
COMMA
44
,
HYPHEN-MINUS
45
-
FULL STOP
46
.
SOLIDUS
47
/
COLON
58
:
SEMICOLON
59
;
LESS-THAN SIGN
60
EQUALS SIGN
61
=
GREATER-THAN SIGN
62
QUESTION MARK
63
?
COMMERCIAL AT
64
@
LEFT SQUARE BRACKET
91
[
REVERSE SOLIDUS
92
\
RIGHT SQUARE BRACKET
93
]
CIRCUMFLEX ACCENT
94
^
LOW LINE
95
_
GRAVE ACCENT
96
`
LEFT CURLY BRACKET
123
{
VERTICAL LINE
124
|
RIGHT CURLY BRACKET
125
}
TILDE
126
~
EURO SIGN
128
SINGLE LOW-9 QUOTATION MARK
130
LATIN SMALL LETTER F WITH HOOK
131
ƒ
DOUBLE LOW-9 QUOTATION MARK
132
HORIZONTAL ELLIPSIS
133
DAGGER
134
DOUBLE DAGGER
135
MODIFIER LETTER CIRCUMFLEX ACCENT
136
ˆ
PER MILLE SIGN
137
LATIN CAPITAL LETTER S WITH CARON
138
Š
SINGLE LEFT-POINTING ANGLE QUOTATION MARK
139
LATIN CAPITAL LIGATURE OE
140
Œ
LEFT SINGLE QUOTATION MARK
145
RIGHT SINGLE QUOTATION MARK
146
LEFT DOUBLE QUOTATION MARK
147
RIGHT DOUBLE QUOTATION MARK
148
BULLET
149
EN DASH
150
EM DASH
151
SMALL TILDE
152
˜
TRADE MARK SIGN
153
SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
155
INVERTED EXCLAMATION MARK
161
¡
CENT SIGN
162
¢
POUND SIGN
163
£
CURRENCY SIGN
164
¤
YEN SIGN
165
¥
BROKEN BAR
166
¦
SECTION SIGN
167
§
DIAERESIS
168
¨
COPYRIGHT SIGN
169
©
FEMININE ORDINAL INDICATOR
170
ª
LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
171
«
NOT SIGN
172
¬
SOFT HYPHEN
173
­
REGISTERED SIGN
174
®
MACRON
175
¯
DEGREE SIGN
176
°
PLUS-MINUS SIGN
177
±
ACUTE ACCENT
180
´
PILCROW SIGN
182
MIDDLE DOT
183
·
CEDILLA
184
¸
MASCULINE ORDINAL INDICATOR
186
º
RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
187
»
INVERTED QUESTION MARK
191
¿
MULTIPLICATION SIGN
215
×
DIVISION SIGN
247
÷

 
Examples
 
Select wct.STRIP('$1,000')
 
This produces the following result
--------------
1,000
 
(1 row(s) affected)


Copyright 2008-2017 Westclintech LLC         Privacy Policy        Terms of Service