all groups > sql server mseq > may 2005 >
You're in the

sql server mseq

group:

Remove letters in column


Remove letters in column DCR
5/18/2005 4:28:01 PM
sql server mseq:
I have a column that have numbers & letters combined in a field. What sql
command would remove the letters only, not the numbers?
I have a table called “customer” and the column in that table is called
“customtext4”. I want to change over 5000 records in this “customtext4” field

Thanks for your help
Re: Remove letters in column Hugo Kornelis
5/19/2005 11:04:18 PM
[quoted text, click to view]

Hi Dave,

String manipulation is a weak spot in SQL Server's command set. This can
be done, but it's clumsy:

UPDATE Customer
SET CustomText4 = REPLACE(
REPLACE(
REPLACE(
....
REPLACE(CustomText, 'A', '')
, 'B', '')
, 'C', '')
.....
, 'Z', '')


Best, Hugo
--

AddThis Social Bookmark Button