Remove numbers from string sql server

1st option –

You can nest REPLACE() functions up to 32 levels deep. It runs fast.

REPLACE
(REPLACE
(REPLACE
(REPLACE
(REPLACE
(REPLACE
(REPLACE
(REPLACE
(REPLACE
(REPLACE (@str, '0', ''),
'1', ''),
'2', ''),
'3', ''),
'4', ''),
'5', ''),
'6', ''),
'7', ''),
'8', ''),
'9', '')

2nd option —
do the reverse of –

Removing nonnumerical data out of a number + SQL

3rd option – if you want to use regex

then
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=27205

Leave a Comment