Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

excluding specific characters from a field

Posted on 2005-05-12
1
Medium Priority
?
255 Views
Last Modified: 2010-03-19
I have a table witn say 1,000,000 records I want to exclide the character "." from the fields leaving no space.

in fixpro the idea would be replace all field with chrtran(field,".","")

Is is simple and fast, any equivalent in MS-SQL
0
Comment
Question by:robrodp
1 Comment
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 2000 total points
ID: 13992740
>>Is is simple and fast, any equivalent in MS-SQL<<
It is simple, whether it is fast, will depend a great deal on the number of rows that need to be updated.

Update TableName
Set ColumnName = REPLACE(ColumnName, '.', '')
Where CHARINDEX('.', ColumnName) > 0


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question