Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Can someone help with an update please
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

3 Posts

Posted - 01/16/2013 :  12:21:02  Show Profile  Reply with Quote
I need to update a table in my db and need some help with the syntax.

I have two variations of data in the same column
1. "_ 199976 _"
2. "199976"

I need to remove the "_ " from the front and back end of the numerals in the entire table which has 50,000 rows

let me now if you can help


James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 01/16/2013 :  12:24:45  Show Profile  Reply with Quote
UPDATE Tbl SET theColumn = LTRIM(RTRIM(REPLACE(theColumn,'_','')));
Go to Top of Page

Starting Member

3 Posts

Posted - 01/16/2013 :  12:27:48  Show Profile  Reply with Quote
Thank you so much
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000